summaryrefslogtreecommitdiff
path: root/tests/common/java/android/net/LinkAddressTest.java
diff options
context:
space:
mode:
authorRemi NGUYEN VAN <reminv@google.com>2022-01-19 07:10:41 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2022-02-10 00:42:00 +0000
commit167fab2e8ec5896af0dbb6b8896f3130edfee8d9 (patch)
treef3918f24b49efd8ee627e0abe4e1d78878491896 /tests/common/java/android/net/LinkAddressTest.java
parent132bd8508a6357b3a7ec349067ce07c1f29de187 (diff)
Do not verify field count in tests used in CTS
Original change: https://android-review.googlesource.com/c/platform/packages/modules/Connectivity/+/1952107 Tests in tests/common and tests/cts are run as part of CtsNetTestCases. Many used assertFieldCountEquals in parceling/unparceling tests to ensure that unexpected fields were not added, or that they were not missed when testing parceling/unparceling. However with many of the classes updatable through module updates, the field count may change in the future, breaking CTS tests. Stop checking for the field count, as it would break on module releases, and its value is lower than the maintenance cost. Bug: 205901761 Test: atest CtsNetTestCases Merged-In: Ie53474eecf0a836788ee15b45adc7a7980c12355 Merged-In: I79854741f7e834574d4825bb737ef507785310fe Merged-In: Ib1701358f9058aeaaa336be8d074cfaa700c4309 (cherry picked from commit 9a2a8e5205d3aad8c16037f440770a979ca4b103) (cherry picked from commit 64dd2c35f1606b5431a0d37dc3e6037e6974aff0) Change-Id: I74d43b3ede00f893cf30a18c58fba32a897530e1 (cherry picked from commit b020e552d834171e3bd844d342c7c4ef2b9320c6) Merged-In:I74d43b3ede00f893cf30a18c58fba32a897530e1
Diffstat (limited to 'tests/common/java/android/net/LinkAddressTest.java')
-rw-r--r--tests/common/java/android/net/LinkAddressTest.java13
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/common/java/android/net/LinkAddressTest.java b/tests/common/java/android/net/LinkAddressTest.java
index 2cf3cf9c11..053a90305c 100644
--- a/tests/common/java/android/net/LinkAddressTest.java
+++ b/tests/common/java/android/net/LinkAddressTest.java
@@ -28,7 +28,6 @@ import static android.system.OsConstants.RT_SCOPE_SITE;
import static android.system.OsConstants.RT_SCOPE_UNIVERSE;
import static com.android.testutils.MiscAsserts.assertEqualBothWays;
-import static com.android.testutils.MiscAsserts.assertFieldCountEquals;
import static com.android.testutils.MiscAsserts.assertNotEqualEitherWay;
import static com.android.testutils.ParcelUtils.assertParcelingIsLossless;
@@ -45,7 +44,6 @@ import androidx.test.filters.SmallTest;
import androidx.test.runner.AndroidJUnit4;
import com.android.testutils.DevSdkIgnoreRule;
-import com.android.testutils.DevSdkIgnoreRule.IgnoreAfter;
import com.android.testutils.DevSdkIgnoreRule.IgnoreUpTo;
import org.junit.Rule;
@@ -352,17 +350,6 @@ public class LinkAddressTest {
assertParcelingIsLossless(l);
}
- @Test @IgnoreAfter(Build.VERSION_CODES.Q)
- public void testFieldCount_Q() {
- assertFieldCountEquals(4, LinkAddress.class);
- }
-
- @Test @IgnoreUpTo(Build.VERSION_CODES.Q)
- public void testFieldCount() {
- // Make sure any new field is covered by the above parceling tests when changing this number
- assertFieldCountEquals(6, LinkAddress.class);
- }
-
@Test @IgnoreUpTo(Build.VERSION_CODES.Q)
public void testDeprecationTime() {
try {