New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 784916 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner: ----
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 2
Type: Bug



Sign in to add a comment

"Test method is missing required size annotation." failure with non-test method

Project Member Reported by pauljensen@chromium.org, Nov 14 2017

Issue description

Repro 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.
 
You seem to have figured out that this was because android.net.Network is only available at API level 21 & above, but yeah, it is impossible to see that from the bot. :/

It's visible in the logcat, but our current logcat capturing logic doesn't handle test listing.
> 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...
:|

yikes, then you got lucky.

Sign in to add a comment