-
Notifications
You must be signed in to change notification settings - Fork 475
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
Can't run more than 4 emulators in MacPro on 2.0.0-SNAPSHOT for test sharding #505
Comments
I don't really see any action to take here. Adb is breaking, and we don't
control ADB, we just ask it to do things via ddmlib.
…On Wed, Dec 6, 2017, 7:34 PM KyleLearnedThis ***@***.***> wrote:
Hi,
It seems that I can't run more than 4 emulators/phones without randomly
failing due to InstallException on Spoon Runner 2.0.0-SNAPSHOT for test
running in sharding mode.
- Spec: OSX 10.12.6
- Emulators: Stock Google Pixel 2
- Apks: (build in 4.3.1 Gradle debug mode for both test and app)
- Android Studio 3.0.1
The number 4 seems to be magic, i can run any combination of phone or
emulator, as long its up to 4. And I monitored CPU usage, doesn't seem to
be a problem there.
2017-12-06 15:19:17 [SR.runTests] Executing instrumentation suite on 6
device(s). 03:19:17 E/Device: Error during Sync: Broken pipe 03:19:17
E/Device: Error during Sync: Broken pipe 2017-12-06 15:19:17 [SDR.run]
InstallException while install other apk on device [emulator-5564]
2017-12-06 15:19:17 [SDR.run] InstallException while install other apk on
device [emulator-5562] com.android.ddmlib.InstallException: Broken pipe at
com.android.ddmlib.Device.installPackage(Device.java:888) at
com.squareup.spoon.SpoonDeviceRunner.run(SpoonDeviceRunner.java:167) at
com.squareup.spoon.SpoonRunner$1.run(SpoonRunner.java:211) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException:
Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at
sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) at
sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at
sun.nio.ch.IOUtil.write(IOUtil.java:65) at
sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) at
com.android.ddmlib.AdbHelper.write(AdbHelper.java:815) at
com.android.ddmlib.AdbHelper.write(AdbHelper.java:794) at
com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:858) at
com.android.ddmlib.SyncService.openSync(SyncService.java:195) at
com.android.ddmlib.Device.getSyncService(Device.java:521) at
com.android.ddmlib.Device.syncPackageToDevice(Device.java:923) at
com.android.ddmlib.Device.installPackage(Device.java:884) ... 5 more
com.android.ddmlib.InstallException: Broken pipe at
com.android.ddmlib.Device.installPackage(Device.java:888) at
com.squareup.spoon.SpoonDeviceRunner.run(SpoonDeviceRunner.java:167) at
com.squareup.spoon.SpoonRunner$1.run(SpoonRunner.java:211) at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException:
Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at
sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) at
sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at
sun.nio.ch.IOUtil.write(IOUtil.java:65) at
sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) at
com.android.ddmlib.AdbHelper.write(AdbHelper.java:815) at
com.android.ddmlib.AdbHelper.write(AdbHelper.java:794) at
com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:858) at
com.android.ddmlib.SyncService.openSync(SyncService.java:195) at
com.android.ddmlib.Device.getSyncService(Device.java:521) at
com.android.ddmlib.Device.syncPackageToDevice(Device.java:923) at
com.android.ddmlib.Device.installPackage(Device.java:884) ... 5 more
2017-12-06 15:19:44 [SDR.handleFiles] Found class name dirs: [] 2017-12-06
15:19:57 [SDR.handleFiles] Found class name dirs: [] 2017-12-06 15:19:59
[SDR.handleFiles] Found class name dirs: [] 2017-12-06 15:20:12
[SDR.handleFiles] Found class name dirs: []
The reason I used 2.0.0-SNAPSHOT because I need the work around for #461
<#461>
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 122
at com.squareup.spoon.axmlparser.StringBlock.getShort(StringBlock.java:241)
at com.squareup.spoon.axmlparser.StringBlock.getRaw(StringBlock.java:99) at
com.squareup.spoon.axmlparser.StringBlock.read(StringBlock.java:66) at
com.squareup.spoon.axmlparser.AXMLParser.doStart(AXMLParser.java:200) at
com.squareup.spoon.axmlparser.AXMLParser.<init>(AXMLParser.java:48) at
com.squareup.spoon.SpoonInstrumentationInfo.parseFromFile(SpoonInstrumentationInfo.java:57)
at com.squareup.spoon.SpoonRunner.run(SpoonRunner.java:117) at
com.squareup.spoon.SpoonRunner.main(SpoonRunner.java:695)
mac-station-80:Spoon jenkins$
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#505>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEEES5ZYLCKFAc_HDY8zFS9tfMmKa43ks5s9zKHgaJpZM4Q4zz6>
.
|
But why does this worked on 1.7.1 with APKs build on 3.X.X Gradle wrapper on the same environment with 6+ emulators? @JakeWharton @edenman |
@JakeWharton @jaredsburrows @dweebo @edenman can someone reopen this? this is prevent me from using Spoon. I really tried hard to use Spoon for test sharding but maybe It's not meant to be for me.
java -jar spoon-runner-2.0.0-SNAPSHOT-all.jar java -jar spoon-runner-2.0.0-SNAPSHOT-all.jar And this turns out that entire suite was run three times total. Alternatives:
|
@KyleLearnedThis Spoon 2.0.0 has not been released and there is documentation lacking for it. I too cannot use it because it seems to break sharding. I am not a collaborator or owner, I cannot open this issue again. |
@KyleLearnedThis @JakeWharton @jaredsburrows @edenman I just found this issue as we were dealing with this as well and I found what it was and wanted to update you guys in case you wanted to keep using spoon 2.0. This broken pipe issue with 4 or more devices is because of changes to the ddmlib in version 26.0.1. I am digging into exactly what change broke it and why but for now, changing the version in the build.gradle of the snapshot does get it working again with more than 4 devices. If I come up with a different/better solution after more digging, I will let you know. |
@mattbutlar Honestly, it might be time to move on to a new tool or use the adb/gradlew commands directly. |
I would agree if we didn't already have multiple test suites setup using it and no one with time to currently explore other options. |
@mattbutlar Its good for sharding with screenshots reports. You could try using https://github.com/gojuno/composer. |
Yeah I was able to use GoJuno Composer for test sharding and very happy with it in past months. |
Hi,
It seems that I can't run more than 4 emulators/phones without tests randomly failing due to InstallException on Spoon Runner 2.0.0-SNAPSHOT for test running in sharding mode.
The commit I am on:
commit 14d7b38a2569dbfcf2d0db3db102e097b3099f92 (HEAD -> master, origin/master, origin/HEAD) Author: Bartłomiej Hołota <[email protected]> Date: Tue Nov 28 17:44:03 2017 +0100 Fix instrumentation args parsing (#495)
The number 4 seems to be magic, I can run any combinations of phones or emulators, as long its up to 4. And I monitored CPU usage, I am not pushing MacPro to stress at all. Also tried the same thing with my MacBook Laptop, this happened as well.
2017-12-06 15:19:17 [SR.runTests] Executing instrumentation suite on 6 device(s). 03:19:17 E/Device: Error during Sync: Broken pipe 03:19:17 E/Device: Error during Sync: Broken pipe 2017-12-06 15:19:17 [SDR.run] InstallException while install other apk on device [emulator-5564] 2017-12-06 15:19:17 [SDR.run] InstallException while install other apk on device [emulator-5562] com.android.ddmlib.InstallException: Broken pipe at com.android.ddmlib.Device.installPackage(Device.java:888) at com.squareup.spoon.SpoonDeviceRunner.run(SpoonDeviceRunner.java:167) at com.squareup.spoon.SpoonRunner$1.run(SpoonRunner.java:211) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at sun.nio.ch.IOUtil.write(IOUtil.java:65) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) at com.android.ddmlib.AdbHelper.write(AdbHelper.java:815) at com.android.ddmlib.AdbHelper.write(AdbHelper.java:794) at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:858) at com.android.ddmlib.SyncService.openSync(SyncService.java:195) at com.android.ddmlib.Device.getSyncService(Device.java:521) at com.android.ddmlib.Device.syncPackageToDevice(Device.java:923) at com.android.ddmlib.Device.installPackage(Device.java:884) ... 5 more com.android.ddmlib.InstallException: Broken pipe at com.android.ddmlib.Device.installPackage(Device.java:888) at com.squareup.spoon.SpoonDeviceRunner.run(SpoonDeviceRunner.java:167) at com.squareup.spoon.SpoonRunner$1.run(SpoonRunner.java:211) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:748) Caused by: java.io.IOException: Broken pipe at sun.nio.ch.FileDispatcherImpl.write0(Native Method) at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java:47) at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java:93) at sun.nio.ch.IOUtil.write(IOUtil.java:65) at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java:471) at com.android.ddmlib.AdbHelper.write(AdbHelper.java:815) at com.android.ddmlib.AdbHelper.write(AdbHelper.java:794) at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:858) at com.android.ddmlib.SyncService.openSync(SyncService.java:195) at com.android.ddmlib.Device.getSyncService(Device.java:521) at com.android.ddmlib.Device.syncPackageToDevice(Device.java:923) at com.android.ddmlib.Device.installPackage(Device.java:884) ... 5 more 2017-12-06 15:19:44 [SDR.handleFiles] Found class name dirs: [] 2017-12-06 15:19:57 [SDR.handleFiles] Found class name dirs: [] 2017-12-06 15:19:59 [SDR.handleFiles] Found class name dirs: [] 2017-12-06 15:20:12 [SDR.handleFiles] Found class name dirs: []
The reason I used 2.0.0-SNAPSHOT because I need the workaround for #461. Because for the APKs build with the latest gradle wrapper 4.3.1 comes with latest Android Studio 3.0.1, I can't them run with spoon-runner-1.7.1-jar-with-dependencies.jar
Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 122 at com.squareup.spoon.axmlparser.StringBlock.getShort(StringBlock.java:241) at com.squareup.spoon.axmlparser.StringBlock.getRaw(StringBlock.java:99) at com.squareup.spoon.axmlparser.StringBlock.read(StringBlock.java:66) at com.squareup.spoon.axmlparser.AXMLParser.doStart(AXMLParser.java:200) at com.squareup.spoon.axmlparser.AXMLParser.<init>(AXMLParser.java:48) at com.squareup.spoon.SpoonInstrumentationInfo.parseFromFile(SpoonInstrumentationInfo.java:57) at com.squareup.spoon.SpoonRunner.run(SpoonRunner.java:117) at com.squareup.spoon.SpoonRunner.main(SpoonRunner.java:695) mac-coolserver-80:Spoon jenkins$
The text was updated successfully, but these errors were encountered: