summaryrefslogtreecommitdiff
path: root/tests/unit/java/android/net/NetworkStatsCollectionTest.java
diff options
context:
space:
mode:
authorLorenzo Colitti <lorenzo@google.com>2022-02-01 14:36:39 +0900
committerJunyu Lai <junyulai@google.com>2022-05-13 10:18:56 +0800
commit322b40c4ff7d18a0df85278da3b58e507ffb9ff6 (patch)
tree357744ad517bb0a77b4d1adc26a738dea8f45bd8 /tests/unit/java/android/net/NetworkStatsCollectionTest.java
parent52f78a06805a60f99da9cf9be4a9d30c3d485b2b (diff)
Skip NetworkStatsManager CTS test before T.
The corresponding class was only mainlined in T so there is no need to run this test on previous Android versions (which must already have passed it on device ship). To do this, switch to JUnit 4 so we can use DevSdkIgnoreRunner. Make setUp and tearDown public (as required by JUnit 4) and move the AppModeFull annotation to the class level to avoid repeating it on every test method. Also switch to getting the instrumentation the instrumentation and the context from InstrumentationRegistry since getInstrumentation() returns null. Bug: 204830222 Test: atest CtsNetTestCases:NetworkStatsManagerTest Test: atest --instant CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest (skips all tests) Test: atest CtsNetTestCasesLatestSdk:android.net.cts.NetworkStatsManagerTest on S device (skips all tests) Change-Id: Ie5689ba6e7826e51c76257cf66bd8fef846376f7 (cherry picked from commit 22ce43b6b991d7fa45cd635b420a21ac3ec713ed) Merged-In: Ie5689ba6e7826e51c76257cf66bd8fef846376f7
Diffstat (limited to 'tests/unit/java/android/net/NetworkStatsCollectionTest.java')
0 files changed, 0 insertions, 0 deletions