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

Issue 776230 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Oct 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 1
Type: Bug



Sign in to add a comment

android_webview_test_apk on Lollipop Phone Tester failing

Project Member Reported by bpastene@chromium.org, Oct 19 2017

Issue description

https://build.chromium.org/p/chromium.android/builders/Lollipop%20Phone%20Tester/builds/15947
https://chromium-swarm.appspot.com/task?id=39470a364a452110

Failing every shard with the following error:
MissingSizeAnnotationError: org.chromium.android_webview.test.AwAutofillTest#initializationError: Test method is missing required size annotation. Add one of: @LargeTest, @Manual, @FlakyTest, @DisabledTest, @MediumTest, @SmallTest, @IntegrationTest, @EnormousTest

https://build.chromium.org/p/chromium.android/builders/Lollipop%20Phone%20Tester/builds/15929 was the first build when it started failing. In the blamelist is the cl https://chromium-review.googlesource.com/c/chromium/src/+/706379, which looks pretty suspect. Assigning to owner.
 
this error message can be somewhat miss leading because of how test are fetched through device go through all of them once. The real error message should be in logcat, but I am not sure how to retrieve the logdog link for this case.
I am working fixing the error message problem
Issue 776431 has been merged into this issue.
Labels: -Pri-2 Pri-1
Status: Started (was: Untriaged)
It seems that a new method "initializationError" is added somewhere.

This is introduced in https://chromium-review.googlesource.com/c/706379/, but I still couldn't find a clue why this got broken.

FYI, I ran the test on L device before rebasing on https://chromium-review.googlesource.com/c/chromium/src/+/721566,
and the test was passing.

Did you try to revert this change?

public static class TestViewStructure -> private static class TestViewStructure
I get the following log when I removed the check in instrumentation_test_instance.py:

C   21.270s Main  [FAIL] org.chromium.android_webview.test.AwAutofillTest#initializationError:                                                                  
C   21.270s Main  java.lang.NoClassDefFoundError: org.chromium.android_webview.test.AwAutofillTest$TestViewStructure                                            
C   21.270s Main        at libcore.reflect.InternalNames.getClass(InternalNames.java:55)                                                                        
C   21.270s Main        at java.lang.Class.getDexCacheType(Class.java:479)
C   21.270s Main        at java.lang.reflect.ArtField.getType(ArtField.java:94)
C   21.270s Main        at java.lang.reflect.Field.getType(Field.java:135)
C   21.270s Main        at java.lang.Class.getDeclaredFields(Class.java:912)
C   21.270s Main        at org.junit.runners.model.TestClass.getSortedDeclaredFields(TestClass.java:77)                                                         
C   21.271s Main        at org.junit.runners.model.TestClass.scanAnnotatedMembers(TestClass.java:70)                                                            
C   21.271s Main        at org.junit.runners.model.TestClass.<init>(TestClass.java:57)                                                                          
C   21.271s Main        at org.junit.runners.ParentRunner.createTestClass(ParentRunner.java:88)                                                                 
C   21.271s Main        at org.junit.runners.ParentRunner.<init>(ParentRunner.java:83)                                                                          
C   21.271s Main        at org.junit.runners.BlockJUnit4ClassRunner.<init>(BlockJUnit4ClassRunner.java:65)                                                      
C   21.271s Main        at android.support.test.internal.runner.junit4.AndroidJUnit4ClassRunner.<init>(AndroidJUnit4ClassRunner.java:37)                        
C   21.271s Main        at org.chromium.base.test.BaseJUnit4ClassRunner.<init>(BaseJUnit4ClassRunner.java:92)                                                   
C   21.271s Main        at org.chromium.android_webview.test.AwJUnit4ClassRunner.<init>(AwJUnit4ClassRunner.java:41)                                            

It seems that declaring mTestViewStructure in AwAutofillTest class is causing this problem. Really weird issue on L.

Re #5, yes I tried but didn't work.

Re #4,

This hasn't to do with https://chromium-review.googlesource.com/c/chromium/src/+/721566, but more to do with moving of TestViewStructure from Rule into Test. I didn't run the test on L with the final patch.
I don't think it is related to rule, it is internal class before your patch.
Overlooked this line

    private TestViewStructure mTestViewStructure;

We shouldn't declare TestViewStructure instance in AwAutofillTest class.
Project Member

Comment 10 by bugdroid1@chromium.org, Oct 20 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2508b5fbd28d7c3d4bde1cc257b91b8d69f3fde1

commit 2508b5fbd28d7c3d4bde1cc257b91b8d69f3fde1
Author: Changwan Ryu <changwan@chromium.org>
Date: Fri Oct 20 00:56:07 2017

Fix AwAutofillTest failure on L

On L devices, declaring fields mTestViewStructure, mChangedValues inside
a test class raises NoClassDefFoundError. Hiding them inside a wrapper
class fixes this.

Note: tested on O and L locally.

BUG= 776230 

Change-Id: Ie31da26482fbe8136ae0efcaf2964217be1fb18f
Reviewed-on: https://chromium-review.googlesource.com/729205
Reviewed-by: Yoland Yan <yolandyan@chromium.org>
Reviewed-by: Tao Bai <michaelbai@chromium.org>
Commit-Queue: Changwan Ryu <changwan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#510278}
[modify] https://crrev.com/2508b5fbd28d7c3d4bde1cc257b91b8d69f3fde1/android_webview/javatests/src/org/chromium/android_webview/test/AwAutofillTest.java

Status: Fixed (was: Started)

Sign in to add a comment