Merge "Remove ForceAllNetworkTypes from test"
This commit is contained in:
@@ -98,14 +98,11 @@ public class NetworkStatsCollectionTest {
|
|||||||
@Before
|
@Before
|
||||||
public void setUp() throws Exception {
|
public void setUp() throws Exception {
|
||||||
sOriginalClock = RecurrenceRule.sClock;
|
sOriginalClock = RecurrenceRule.sClock;
|
||||||
// ignore any device overlay while testing
|
|
||||||
NetworkTemplate.forceAllNetworkTypes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@After
|
@After
|
||||||
public void tearDown() throws Exception {
|
public void tearDown() throws Exception {
|
||||||
RecurrenceRule.sClock = sOriginalClock;
|
RecurrenceRule.sClock = sOriginalClock;
|
||||||
NetworkTemplate.resetForceAllNetworkTypes();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void setClock(Instant instant) {
|
private void setClock(Instant instant) {
|
||||||
@@ -123,7 +120,7 @@ public class NetworkStatsCollectionTest {
|
|||||||
|
|
||||||
// verify that history read correctly
|
// verify that history read correctly
|
||||||
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
||||||
636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE);
|
636014522L, 709291L, 88037144L, 518820L, NetworkStatsAccess.Level.DEVICE);
|
||||||
|
|
||||||
// now export into a unified format
|
// now export into a unified format
|
||||||
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
@@ -137,7 +134,7 @@ public class NetworkStatsCollectionTest {
|
|||||||
// and read back into structure, verifying that totals are same
|
// and read back into structure, verifying that totals are same
|
||||||
collection.read(new ByteArrayInputStream(bos.toByteArray()));
|
collection.read(new ByteArrayInputStream(bos.toByteArray()));
|
||||||
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
||||||
636016770L, 709306L, 88038768L, 518836L, NetworkStatsAccess.Level.DEVICE);
|
636014522L, 709291L, 88037144L, 518820L, NetworkStatsAccess.Level.DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@@ -151,7 +148,7 @@ public class NetworkStatsCollectionTest {
|
|||||||
|
|
||||||
// verify that history read correctly
|
// verify that history read correctly
|
||||||
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
||||||
637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE);
|
637073904L, 711398L, 88342093L, 521006L, NetworkStatsAccess.Level.DEVICE);
|
||||||
|
|
||||||
// now export into a unified format
|
// now export into a unified format
|
||||||
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
final ByteArrayOutputStream bos = new ByteArrayOutputStream();
|
||||||
@@ -165,7 +162,7 @@ public class NetworkStatsCollectionTest {
|
|||||||
// and read back into structure, verifying that totals are same
|
// and read back into structure, verifying that totals are same
|
||||||
collection.read(new ByteArrayInputStream(bos.toByteArray()));
|
collection.read(new ByteArrayInputStream(bos.toByteArray()));
|
||||||
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
assertSummaryTotal(collection, buildTemplateMobileAll(TEST_IMSI),
|
||||||
637076152L, 711413L, 88343717L, 521022L, NetworkStatsAccess.Level.DEVICE);
|
637073904L, 711398L, 88342093L, 521006L, NetworkStatsAccess.Level.DEVICE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
Reference in New Issue
Block a user