-
-
Notifications
You must be signed in to change notification settings - Fork 125
Description
Describe the bug
Run tests on multiple CTV devices (8). Sometimes could encounter AdbServerException. We are validate deeplinks handling and UI. Navigation via Dpad key commands. Exception could happen at very beginning of workflow (second, third test), BUT, it usually does not spread between emulators. Like one out of eight emulator catches exception and till the end of workflow it will fail all tests. Other emulators execute tests without an AdbServerException
Decreasing number of emulators doesn't help
Changing device profile, API level doesn't help
To Reproduce
Run tests on multiple CTV devices until it fails
Logs and reports
com.kaspersky.kaspresso.internal.exceptions.AdbServerException:
AdbServer. The command=shell was performed with timeout exception.
There are two possible reasons:
1. The test is executing on the JVM (with Robolectric) environment and the test uses AdbServer. But, Unit tests can't use this implementation of AdbServer.
Possible solutions:
a. Rewrite the test and replace/remove a peace of code where AdbServer is called.
b. Write another implementation of AdbServer.
c. Don't use this test like a JVM(Unit)-test.
2. The second reason is absence of started 'adbserver-desktop.jar'.
Please, follow the instruction to resolve this issue:
a. Find the last 'adbserver-desktop.jar' here - https://github.com/KasperskyLab/Kaspresso/tree/master/artifacts.
b. Copy 'adbserver-desktop.jar' to your machine. For example, /Users/yuri.gagarin/Desktop/adbserver-desktop.jar.
c. Start 'adbserver-desktop.jar' with the command in Terminal - 'java -jar /Users/yuri.gagarin/Desktop/adbserver-desktop.jar
at com.kaspersky.kaspresso.device.server.AdbServerImpl.logCommandResult(AdbServerImpl.kt:115)
at com.kaspersky.kaspresso.device.server.AdbServerImpl.logCommandResult$default(AdbServerImpl.kt:109)
at com.kaspersky.kaspresso.device.server.AdbServerImpl.perform(AdbServerImpl.kt:104)
at com.kaspersky.kaspresso.device.server.AdbServerImpl.performShell(AdbServerImpl.kt:91)
Devices (please complete the following information):
- Device: Android TV emulator with 720p profile
- OS: Android 31
But it doesn't matter it reproduces on any device config
Additional context
- Mobile tests running just fine, and there are more tests for mobile
- To mitigate issue I am creating fresh AVDs before each workflow run. Also, I am restarting adb server before each run
adb kill-server
adb start-server
------- test map. there are some flaky failures. 127.0.0.1:5037:emulator-5562 is the culprit ---------
