commit | 91cb0e87f7fc655deba43802fac127e326ca31a8 | [log] [tgz] |
---|---|---|
author | Android Merger <noreply-android-build-merger@google.com> | Tue Mar 06 21:29:30 2018 +0000 |
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | Tue Mar 06 21:29:30 2018 +0000 |
tree | bd8f8b9d84191c7e708d1552d1186ca8ceddc7b8 | |
parent | f1d7319d9d053cb6ec419dfb078e2fd5bd6579e9 [diff] | |
parent | 9b594529dc205337b33a2597a2aaf094a04c0fb9 [diff] |
Merge "Merge "Fix timing issue for testAlwaysOnVpnPackageUninstalled test cases" into oreo-cts-dev am: ced6c920fe" into oreo-mr1-cts-dev
diff --git a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java index 6eed964..25d7be7 100644 --- a/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java +++ b/hostsidetests/devicepolicy/app/DeviceAndProfileOwner/src/com/android/cts/deviceandprofileowner/AlwaysOnVpnMultiStageTest.java
@@ -66,6 +66,14 @@ } public void testAlwaysOnVpnDisabled() throws Exception { + // Wait until always-on vpn package is being removed (with 1 minute timeout). + for (int i = 0; i < 60; i++) { + if (mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT) == null) { + break; + } + Thread.sleep(1000); // 1 second. + } + // After the vpn app being uninstalled, check that always-on vpn is null assertNull(mDevicePolicyManager.getAlwaysOnVpnPackage(ADMIN_RECEIVER_COMPONENT)); assertFalse(VpnTestHelper.isNetworkVpn(mContext));