From d0c37e8d1bb50099f54e3fbcb25d08eca290f340 Mon Sep 17 00:00:00 2001 From: Etan Cohen Date: Thu, 15 Mar 2018 11:27:37 -0700 Subject: [PATCH] [RTT] Remove testAvailabilityStatusChange because of lack of triggering API The availability status change test performs the following: - Disable RTT - Verifies broadcast informing of RTT status change arrives (and then validates disabled) - Enable RTT - Verifies broadcast informing of RTT status change arrives (and then validates enabled) However: there is no API available to CTS (to apps) to disable RTT in a robust way: - No APM control API - Disabling Wi-Fi is possible but that only disables RTT if scans are also disabled and there is no API for that and the rest of the tests requires scans to be on (higher priority tests). Bug: 74518964 Test: atest CtsNetTestCases:WifiRttTest Change-Id: Ieaeca065661cebae1921933fad56f82dd6f30c2f --- .../android/net/wifi/rtt/cts/WifiRttTest.java | 30 ------------------- 1 file changed, 30 deletions(-) diff --git a/tests/cts/net/src/android/net/wifi/rtt/cts/WifiRttTest.java b/tests/cts/net/src/android/net/wifi/rtt/cts/WifiRttTest.java index 983aa5e26f..5e8ae1602d 100644 --- a/tests/cts/net/src/android/net/wifi/rtt/cts/WifiRttTest.java +++ b/tests/cts/net/src/android/net/wifi/rtt/cts/WifiRttTest.java @@ -147,36 +147,6 @@ public class WifiRttTest extends TestBase { } } - /** - * Validate that on Wi-Fi RTT availability change we get a broadcast + the API returns - * correct status. - */ - public void testAvailabilityStatusChange() throws Exception { - if (!shouldTestWifiRtt(getContext())) { - return; - } - - // 1. Disable Wi-Fi - WifiRttBroadcastReceiver receiver1 = new WifiRttBroadcastReceiver(); - mContext.registerReceiver(receiver1, mRttIntent); - mWifiManager.setWifiEnabled(false); - - assertTrue("Timeout waiting for Wi-Fi RTT to change status", - receiver1.waitForStateChange()); - assertFalse("Wi-Fi RTT is available (should not be)", mWifiRttManager.isAvailable()); - mContext.unregisterReceiver(receiver1); - - // 2. Enable Wi-Fi - WifiRttBroadcastReceiver receiver2 = new WifiRttBroadcastReceiver(); - mContext.registerReceiver(receiver2, mRttIntent); - mWifiManager.setWifiEnabled(true); - - assertTrue("Timeout waiting for Wi-Fi RTT to change status", - receiver2.waitForStateChange()); - assertTrue("Wi-Fi RTT is not available (should be)", mWifiRttManager.isAvailable()); - mContext.unregisterReceiver(receiver2); - } - /** * Validate that when a request contains more range operations than allowed (by API) that we * get an exception.