"Test method is missing required size annotation." failure with non-test method |
|
Issue descriptionRepro test case: https://chromium-review.googlesource.com/c/chromium/src/+/768293 Look at failing linux_android_rel_ng -> content_shell_test and you'll see: Traceback (most recent call last): File "/b/swarming/w/ir/build/android/test_runner.py", line 1010, in main return RunTestsCommand(args) File "/b/swarming/w/ir/build/android/test_runner.py", line 735, in RunTestsCommand return RunTestsInPlatformMode(args) File "/b/swarming/w/ir/build/android/test_runner.py", line 857, in RunTestsInPlatformMode raw_results = test_run.RunTests() File "/b/swarming/w/ir/build/android/pylib/local/device/local_device_test_run.py", line 57, in RunTests tests = self._GetTests() File "/b/swarming/w/ir/build/android/pylib/local/device/local_device_instrumentation_test_run.py", line 336, in _GetTests tests = self._test_instance.ProcessRawTests(raw_tests) File "/b/swarming/w/ir/build/android/pylib/instrumentation/instrumentation_test_instance.py", line 860, in ProcessRawTests self._excluded_annotations) File "/b/swarming/w/ir/build/android/pylib/instrumentation/instrumentation_test_instance.py", line 263, in FilterTests raise MissingSizeAnnotationError(GetTestName(t)) MissingSizeAnnotationError: org.chromium.net.NetworkChangeNotifierTest#initializationError: Test method is missing required size annotation. Add one of: @LargeTest, @Manual, @FlakyTest, @DisabledTest, @MediumTest, @SmallTest, @IntegrationTest, @EnormousTest But if you look at the CL the only added function is not a test (i.e. has no @Test and isn't named with a "test" prefix). This is boiled down from https://chromium-review.googlesource.com/c/chromium/src/+/727840 where it delayed me a while.
,
Nov 15 2017
> You seem to have figured out that this was because android.net.Network is only available at API level 21 & above Actually I had no idea...I just randomly moved around the code until it passed...
,
Nov 15 2017
:| yikes, then you got lucky. |
|
►
Sign in to add a comment |
|
Comment 1 by jbudorick@chromium.org
, Nov 15 2017