connectedAndroidTest返回installException:连接超过5个设备时由对等方重置连接

时间:2016-03-30 06:49:14

标签: android gradle adt ddms

使用少量仪器测试用例实现测试应用程序。 使用USB集线器连接7个测试设备。 跑androidConnectedTest。

它正在少数设备上运行测试,而在其他设备上,通过对等消息重置连接会导致异常。

Executing task ':test-flow2:connectedAndroidTest' (up-to-date check took 0.0 secs) due to:
  Task has not declared any outputs.
deleteDir(/Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/androidTest-results/connected) returned: true
deleteDir(/Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/code-coverage/connected) returned: true
11:36:14 E/Device: Error during Sync: Connection reset by peer
Unable to install /Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/apk/test-flow2-debug.apk

    com.android.ddmlib.InstallException: Connection reset by peer
        at com.android.ddmlib.Device.installPackages(Device.java:901)
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:101)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:123)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:47)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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:745)
    Caused by: java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
        at sun.nio.ch.IOUtil.read(IOUtil.java:197)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:758)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:734)
        at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:226)
        at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:852)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:457)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:387)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:356)
        at com.android.ddmlib.Device.executeShellCommand(Device.java:556)
        at com.android.ddmlib.Device.createMultiInstallSession(Device.java:967)
        at com.android.ddmlib.Device.installPackages(Device.java:864)
        ... 9 more

    com.android.builder.testing.ConnectedDevice > runTests[XT1092 - 5.1] [31mFAILED [0m
        com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Connection reset by peer
            at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:104)
    11:36:14 E/Device: Error during Sync: Connection reset by peer
    11:36:14 E/Device: Error during Sync: Connection reset by peer
    Unable to install /Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/apk/test-flow2-debug.apk
    com.android.ddmlib.InstallException: Connection reset by peer
        at com.android.ddmlib.Device.installPackages(Device.java:901)
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:101)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:123)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:47)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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:745)
    Caused by: java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
        at sun.nio.ch.IOUtil.read(IOUtil.java:197)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:758)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:734)
        at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:226)
        at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:852)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:457)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:387)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:356)
        at com.android.ddmlib.Device.executeShellCommand(Device.java:556)
        at com.android.ddmlib.Device.createMultiInstallSession(Device.java:967)
        at com.android.ddmlib.Device.installPackages(Device.java:864)
        ... 9 more
    11:36:14 E/Device: Error during Sync: Connection reset by peer
    11:36:14 E/Device: Error during Sync: Connection reset by peer
    Unable to install /Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/apk/test-flow2-debug.apk
    com.android.ddmlib.InstallException: Connection reset by peer
        at com.android.ddmlib.Device.installPackages(Device.java:901)
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:101)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:123)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:47)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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:745)
    Caused by: java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
        at sun.nio.ch.IOUtil.read(IOUtil.java:197)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:758)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:734)
        at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:226)
        at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:852)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:457)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:387)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:356)
        at com.android.ddmlib.Device.executeShellCommand(Device.java:556)
        at com.android.ddmlib.Device.createMultiInstallSession(Device.java:967)
        at com.android.ddmlib.Device.installPackages(Device.java:864)
        ... 9 more
    Unable to install /Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/apk/test-flow2-debug.apk
    com.android.ddmlib.InstallException: Connection reset by peer
        at com.android.ddmlib.Device.installPackages(Device.java:901)
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:101)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:123)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:47)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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:745)
    Caused by: java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
        at sun.nio.ch.IOUtil.read(IOUtil.java:197)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:758)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:734)
        at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:226)
        at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:852)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:457)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:387)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:356)
        at com.android.ddmlib.Device.executeShellCommand(Device.java:556)
        at com.android.ddmlib.Device.createMultiInstallSession(Device.java:967)
        at com.android.ddmlib.Device.installPackages(Device.java:864)
        ... 9 more

    com.android.builder.testing.ConnectedDevice > runTests[Nexus 6P - 6.0.1] [31mFAILED [0m

    com.android.builder.testing.ConnectedDevice > runTests[Nexus 6 - 6.0.1] [31mFAILED [0m
    Unable to install /Users/jenkins/workspace/build-android-sdk/test-flow2/build/outputs/apk/test-flow2-debug.apk
    com.android.ddmlib.InstallException: Connection reset by peer
        at com.android.ddmlib.Device.installPackages(Device.java:901)
        at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:101)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:123)
        at com.android.builder.internal.testing.SimpleTestCallable.call(SimpleTestCallable.java:47)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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:745)
    Caused by: java.io.IOException: Connection reset by peer
        at sun.nio.ch.FileDispatcherImpl.read0(Native Method)
        at sun.nio.ch.SocketDispatcher.read(SocketDispatcher.java:39)
        at sun.nio.ch.IOUtil.readIntoNativeBuffer(IOUtil.java:223)
        at sun.nio.ch.IOUtil.read(IOUtil.java:197)
        at sun.nio.ch.SocketChannelImpl.read(SocketChannelImpl.java:380)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:758)
        at com.android.ddmlib.AdbHelper.read(AdbHelper.java:734)
        at com.android.ddmlib.AdbHelper.readAdbResponse(AdbHelper.java:226)
        at com.android.ddmlib.AdbHelper.setDevice(AdbHelper.java:852)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:457)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:387)
        at com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:356)
        at com.android.ddmlib.Device.executeShellCommand(Device.java:556)
        at com.android.ddmlib.Device.createMultiInstallSession(Device.java:967)
        at com.android.ddmlib.Device.installPackages(Device.java:864)
        ... 9 more

    com.android.builder.testing.ConnectedDevice > runTests[Nexus 5X - 6.0.1] [31mFAILED [0m
        com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Connection reset by peer
            at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:104)
        com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Connection reset by peer
            at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:104)
        com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Connection reset by peer
            at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:104)

    com.android.builder.testing.ConnectedDevice > runTests[E5653 - 5.0] [31mFAILED [0m
        com.android.builder.testing.api.DeviceException: com.android.ddmlib.InstallException: Connection reset by peer
            at com.android.builder.testing.ConnectedDevice.installPackages(ConnectedDevice.java:104)
    Starting 36 tests on SM-G900V - 4.4.2

0 个答案:

没有答案