diff options
author | Julien Desprez <jdesprez@google.com> | 2016-01-25 14:52:41 +0000 |
---|---|---|
committer | Julien Desprez <jdesprez@google.com> | 2016-01-25 14:52:41 +0000 |
commit | 94bdf0864835baf19caf1e609f1121965fa91930 (patch) | |
tree | aa539c64d25b13ae79766d2be1427835e6e4c9f9 | |
parent | e4f54129bc2d0594e08b9bf1ea644a4637d06f2c (diff) | |
download | tradefederation-94bdf0864835baf19caf1e609f1121965fa91930.tar.gz |
Fix some issues for Functional Tests
-Option -w doesn't exist for am start, -W instead.
-wait time before reboot wasn't enough on some devices
to read status before adb reboot occurs.
Change-Id: I656697c5ad8d4082c2b7972df0846f4dbd7be829
-rw-r--r-- | tests/src/com/android/tradefed/device/TestDeviceFuncTest.java | 2 | ||||
-rw-r--r-- | tests/src/com/android/tradefed/testtype/InstrumentationTestFuncTest.java | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/src/com/android/tradefed/device/TestDeviceFuncTest.java b/tests/src/com/android/tradefed/device/TestDeviceFuncTest.java index 15c6a7d30..72d1bee48 100644 --- a/tests/src/com/android/tradefed/device/TestDeviceFuncTest.java +++ b/tests/src/com/android/tradefed/device/TestDeviceFuncTest.java @@ -545,7 +545,7 @@ public class TestDeviceFuncTest extends DeviceTestCase { public void testClearErrorDialogs_crash() throws DeviceNotAvailableException { Log.i(LOG_TAG, "testClearErrorDialogs_crash"); // now cause a crash dialog to appear - getDevice().executeShellCommand("am start -w -n " + TestAppConstants.CRASH_ACTIVITY); + getDevice().executeShellCommand("am start -W -n " + TestAppConstants.CRASH_ACTIVITY); getDevice().clearErrorDialogs(); assertTrue(runUITests()); } diff --git a/tests/src/com/android/tradefed/testtype/InstrumentationTestFuncTest.java b/tests/src/com/android/tradefed/testtype/InstrumentationTestFuncTest.java index 04e8d5cd5..7c7cd4434 100644 --- a/tests/src/com/android/tradefed/testtype/InstrumentationTestFuncTest.java +++ b/tests/src/com/android/tradefed/testtype/InstrumentationTestFuncTest.java @@ -172,7 +172,7 @@ public class InstrumentationTestFuncTest extends DeviceTestCase { public void run() { // wait for test run to begin try { - Thread.sleep(500); + Thread.sleep(2000); Runtime.getRuntime().exec( String.format("adb -s %s reboot", getDevice().getIDevice() .getSerialNumber())); |