Merge "Revert "Test IPv6ProvisioningLossParcelable in the NetworkAttrib..."" am: 8ec089e59a am: 007c9dd007

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1353491

Change-Id: Ibc8d633a6e04f7cd0f4c1a0d02ae586232cc0c6a
This commit is contained in:
Chalard Jean
2020-07-01 05:33:41 +00:00
committed by Automerger Merge Worker
2 changed files with 3 additions and 24 deletions

View File

@@ -19,7 +19,6 @@ package com.android.server.net.ipmemorystore;
import static org.junit.Assert.assertEquals;
import android.net.ipmemorystore.NetworkAttributes;
import android.net.quirks.IPv6ProvisioningLossQuirk;
import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
@@ -53,8 +52,6 @@ public class NetworkAttributesTest {
}
assertEquals(sum, NetworkAttributes.TOTAL_WEIGHT, EPSILON);
final IPv6ProvisioningLossQuirk ipv6ProvLossQuirk =
new IPv6ProvisioningLossQuirk(3, System.currentTimeMillis() + 7_200_000);
// Use directly the constructor with all attributes, and make sure that when compared
// to itself the score is a clean 1.0f.
final NetworkAttributes na =
@@ -64,7 +61,7 @@ public class NetworkAttributesTest {
"some hint",
Arrays.asList(Inet4Address.getByAddress(new byte[] {5, 6, 7, 8}),
Inet4Address.getByAddress(new byte[] {9, 0, 1, 2})),
98, ipv6ProvLossQuirk);
98);
assertEquals(1.0f, na.getNetworkGroupSamenessConfidence(na), EPSILON);
}
}