llCommandUnresponsiveException上模

llCommandUnresponsiveException上模

本文介绍了Android的CTS是显示ShellCommandUnresponsiveException上模拟器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我就在Android 2.2上运行的模拟器运行Android CTS Android的测试计划。

I am running Android CTS Android Test Plan on an emulator running on Android 2.2.

但大多数的测试用例都出现超时和错误显示com.android.ddmlib.ShellCommandUnresponsiveException。

But most of the test cases are showing timeout and the error shows com.android.ddmlib.ShellCommandUnresponsiveException.

有什么办法来解决这个问题呢?

Is there any way to solve this issue ?

推荐答案

设置shell命令超时为5分钟(而不是5秒: - ))

Set shell command time out to 5 minutes (instead of 5 seconds:-))

diff --git a/tools/host/src/com/android/cts/TestDevice.java b/tools/host/src/com/android/cts/TestDevice.java
index 65ff969..b8578bc 100644
--- a/tools/host/src/com/android/cts/TestDevice.java
+++ b/tools/host/src/com/android/cts/TestDevice.java
@@ -18,6 +18,7 @@ package com.android.cts;

 import com.android.ddmlib.Client;
 import com.android.ddmlib.ClientData;
+import com.android.ddmlib.DdmPreferences;
 import com.android.ddmlib.IDevice;
 import com.android.ddmlib.IShellOutputReceiver;
 import com.android.ddmlib.MultiLineReceiver;
@@ -143,6 +144,7 @@ public class TestDevice implements DeviceObserver {
         mDeviceInfo = new DeviceParameterCollector();
         mPackageActionTimer = new PackageActionTimer();
         mObjectSync = new ObjectSync();
+        DdmPreferences.setTimeOut(300000);
     }

这篇关于Android的CTS是显示ShellCommandUnresponsiveException上模拟器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-03 16:51