diff options
| author | Remi NGUYEN VAN <reminv@google.com> | 2022-01-18 12:36:25 +0900 |
|---|---|---|
| committer | Remi NGUYEN VAN <reminv@google.com> | 2022-01-18 16:55:32 +0900 |
| commit | 8bc36966d4e7aeb1eca933326d5e314af4909ed5 (patch) | |
| tree | 058516bb83cf3a812e32a33f8ed08bbf80ffa083 /tests/common/java/android/net/RouteInfoTest.java | |
| parent | 392161e651d870c1c5dcf5ff1b1cb5afd029dea4 (diff) | |
Do not verify field count in tests used in CTS
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
Change-Id: I79854741f7e834574d4825bb737ef507785310fe
Diffstat (limited to 'tests/common/java/android/net/RouteInfoTest.java')
| -rw-r--r-- | tests/common/java/android/net/RouteInfoTest.java | 13 |
1 files changed, 0 insertions, 13 deletions
diff --git a/tests/common/java/android/net/RouteInfoTest.java b/tests/common/java/android/net/RouteInfoTest.java index b69b04561b..2fe3156ad4 100644 --- a/tests/common/java/android/net/RouteInfoTest.java +++ b/tests/common/java/android/net/RouteInfoTest.java @@ -21,7 +21,6 @@ import static android.net.RouteInfo.RTN_UNICAST; import static android.net.RouteInfo.RTN_UNREACHABLE; 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; @@ -39,7 +38,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; @@ -383,17 +381,6 @@ public class RouteInfoTest { assertParcelingIsLossless(r); } - @Test @IgnoreAfter(Build.VERSION_CODES.Q) - public void testFieldCount_Q() { - assertFieldCountEquals(6, RouteInfo.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(7, RouteInfo.class); - } - @Test @IgnoreUpTo(Build.VERSION_CODES.Q) public void testMtu() { RouteInfo r; |
