summaryrefslogtreecommitdiff
path: root/tests/unit/java/android/net/NetworkStatsHistoryTest.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2021-06-29 17:16:28 +0900
committerRemi NGUYEN VAN <reminv@google.com>2021-06-30 12:00:28 +0900
commit154cf1da20a77176ac42faed117a48afcf840bf4 (patch)
tree813bf2c44e560ab548d1b718f8b80cb77f3f7bfd /tests/unit/java/android/net/NetworkStatsHistoryTest.java
parent57c0380135b928377113b1fe12d41f6da370a56f (diff)
Re-skip connectivity unit tests before S
The tests are packaged together with other tests in a common coverage suite, so need to be individually annotated so that they are skipped before S. They do not need to pass on platforms older than S, because such platforms will not updated with the code that is tested. This applies a previous change, this time using DevSdkIgnoreRunner, as SdkSuppress does not work as expected in branches that have a codename 2 versions above the SDK version, as is the case in AOSP. Bug: 187935317 Test: atest ConnectivityCoverageTests on R atest FrameworksNetTests on S Change-Id: I5808d34459a4c19238baf8873afa7cf942828460
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsHistoryTest.java')
-rw-r--r--tests/unit/java/android/net/NetworkStatsHistoryTest.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/tests/unit/java/android/net/NetworkStatsHistoryTest.java b/tests/unit/java/android/net/NetworkStatsHistoryTest.java
index 13558cd51c..c5f8c00459 100644
--- a/tests/unit/java/android/net/NetworkStatsHistoryTest.java
+++ b/tests/unit/java/android/net/NetworkStatsHistoryTest.java
@@ -38,13 +38,15 @@ import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import android.content.Context;
+import android.os.Build;
import android.util.Log;
import androidx.test.InstrumentationRegistry;
import androidx.test.filters.SmallTest;
-import androidx.test.runner.AndroidJUnit4;
import com.android.frameworks.tests.net.R;
+import com.android.testutils.DevSdkIgnoreRule;
+import com.android.testutils.DevSdkIgnoreRunner;
import org.junit.After;
import org.junit.Test;
@@ -56,8 +58,9 @@ import java.io.DataInputStream;
import java.io.DataOutputStream;
import java.util.Random;
-@RunWith(AndroidJUnit4.class)
+@RunWith(DevSdkIgnoreRunner.class)
@SmallTest
+@DevSdkIgnoreRule.IgnoreUpTo(Build.VERSION_CODES.R)
public class NetworkStatsHistoryTest {
private static final String TAG = "NetworkStatsHistoryTest";