Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gordon does not pick up all available devices #117

Open
joshschriever opened this issue Jul 25, 2022 Discussed in #116 · 2 comments
Open

Gordon does not pick up all available devices #117

joshschriever opened this issue Jul 25, 2022 Discussed in #116 · 2 comments

Comments

@joshschriever
Copy link
Collaborator

Discussed in #116

In my setup all devices are in one pool, e.g. with PoolingStrategy.SinglePool or PoolingStrategy.Manual (all devices manually added to a single pool) - tried both options to see if it makes any difference.

The scenarios I described above is that there are always devices (marked as NOT PICKED above) which are completely ignored during the whole test run. I have around 600 tests. They run (one test per device) only on the devices marked above as picked.

My expectation would be that all devices in the pool will be at some point used during the whole run. Running each test once on any of those devices.

More clarification: before the test starts I see in the log the installation of the app APK and test APK, already there the ignored devices are consistently not shown. No timeout message, etc. I also increased the installation timeout but no change.

... building part of the log ...
00:21:55.440  > Task :app:gordon
00:22:42.170  real-device-2: installing app.package.name
00:22:42.170  real-device-3: installing app.package.name
00:22:42.170  host-a:7555: installing app.package.name
00:22:42.170  host-b:8555: installing app.package.name
00:22:42.170  
00:22:42.170  The APKs have been extracted in the directory: /tmp/830506879766754033
00:22:42.170  The APKs have been extracted in the directory: /tmp/15378697174757927620
00:22:42.171  The APKs have been extracted in the directory: /tmp/14582370386234563643
00:22:42.171  The APKs have been extracted in the directory: /tmp/2033343059800847795
00:22:52.158  
00:22:52.158  > Task :app:gordon
00:22:52.158  host-b:8555: installing app.package.name.test
00:22:54.078  host-a:7555: installing app.package.name.test
00:22:57.383  host-b:8557: installing app.package.name
00:22:57.383  
00:22:57.383  The APKs have been extracted in the directory: /tmp/3186994027525455358
00:23:09.634  
00:23:09.634  > Task :app:gordon
00:23:09.634  host-b:8557: installing app.package.name.test
00:24:46.085  real-device-2: installing app.package.name.test
00:24:46.085  real-device-3: installing app.package.name.test
... tests start ....

In the log the devices: real-device-1, host-b:8559 do not show nor are those devices used.

As I said, if I turn off/disconnect the ignored devices another 2 devices will be not picked at all. In the example shown in the log if I disconnect real-device-1, real-device-2 will not be picked. If I turn off host-b:8559, host-b:8557 will not be picked by the test at all.

It seams strange. But it somehow seems as if the devices get clustered by type (real/emulator) and host where they run. The behavior described above seems to then apply for each cluster which has more than 1 device:

If I have: real-device-1, emulator-1, host-a:7555, host-b:8555 all devices get picked.
If I have: real-device-1, real-device-2, emulator-1, host-a:7555, host-b:8555 => real-device-1 does not get picked.
If I have: real-device-1, real-device-2, real-device-3, emulator-1, host-a:7555, host-b:8555 => real-device-1 does not get picked.
If I have: real-device-1, emulator-1, host-a:7555, host-b:8555, host-b:8557 => host-b:8557 does not get picked.
If I have: real-device-1, emulator-1, host-a:7555, host-b:8555, host-b:8557, host-b:8559 => host-b:8559 does not get picked.

Weird right?

@kubovy
Copy link

kubovy commented Jul 25, 2022

Since you said that this might be connected to ADB: It happens when I use, both, the PoolingStrategy.SinglePool and also the PoolingStrategy.Manual putting all devices manually in one "pool" there.

ADB sees all the devices all the time.

@kubovy
Copy link

kubovy commented Jul 26, 2022

Steps to reproduce:

  • connect more than one real device on the machine where gordon is running
  • start more than one emulator on the machine where gordon is running
  • start more than one emulator on a different machine and connect using adb connect to the machine where gordon is running
  • run gradle gordon

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants