relaycorp / awala-ping-android

Android app for the Awala Ping Service
GNU General Public License v3.0
0 stars 0 forks source link

Flaky instrumentation tests break CI on Android 11 #167

Closed gnarea closed 2 years ago

gnarea commented 3 years ago

I've found 3 tests that often break:

Test 1: tech.relaycorp.ping.ui.ping.SendPingActivityTest:picksDefaultPeer

See: https://github.com/relaycorp/awala-ping-android/pull/165#issuecomment-953890270

Test 2: tech.relaycorp.ping.ui.ping.PingActivityTest:displaysPingWithPong

com.adevinta.android.barista.internal.failurehandler.BaristaException: No view matching ((an instance of android.widget.TextView and view.getText() with or without transformation to match: is "example.org" or (view.getParent() is assignable from class <class com.google.android.material.textfield.TextInputLayout> and (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() with or without transformation to match: is "example.org")))) was found
    at com.adevinta.android.barista.internal.failurehandler.SpyFailureHandler.resendFirstError(SpyFailureHandler.kt:25)
    at com.adevinta.android.barista.internal.AssertAnyKt.assertAnyView(AssertAny.kt:40)
    at com.adevinta.android.barista.internal.AssertAnyKt.assertAny(AssertAny.kt:18)
    at com.adevinta.android.barista.assertion.BaristaVisibilityAssertions.assertDisplayed(BaristaVisibilityAssertions.kt:38)
    at tech.relaycorp.ping.ui.ping.PingActivityTest.displaysPingWithPong(PingActivityTest.kt:79)
    ... 34 trimmed
Caused by: androidx.test.espresso.NoMatchingViewException: No views in hierarchy found matching: (an instance of android.widget.TextView and view.getText() with or without transformation to match: is "example.org" or (view.getParent() is assignable from class <class com.google.android.material.textfield.TextInputLayout> and (view is an instance of android.view.ViewGroup and has descendant matching an instance of android.widget.TextView and view.getText() with or without transformation to match: is "example.org")))

View Hierarchy:
+>DecorView{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params={(0,0)(fillxfill) ty=BASE_APPLICATION wanim=0x10302fe
  fl=LAYOUT_IN_SCREEN LAYOUT_INSET_DECOR SPLIT_TOUCH HARDWARE_ACCELERATED DRAWS_SYSTEM_BAR_BACKGROUNDS
  pfl=FORCE_DRAW_STATUS_BAR_BACKGROUND FIT_INSETS_CONTROLLED
  fitSides=}, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
|
+->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@4747566, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
|
+-->ViewStub{id=16908719, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@43f40a7, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
|
+-->FrameLayout{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@66010fd, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
|
+--->FitWindowsLinearLayout{id=2131296319, res-name=action_bar_root, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@f2f6c0, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
|
+---->ViewStubCompat{id=2131296331, res-name=action_mode_bar_stub, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=true, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@721bff9, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
|
+---->ContentFrameLayout{id=16908290, res-name=content, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@bc19d9f, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
|
+----->CoordinatorLayout{id=-1, visibility=VISIBLE, width=1080, height=1920, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@770beec, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=2} 
|
+------>AppBarLayout{id=2131296346, res-name=appBar, visibility=VISIBLE, width=1080, height=220, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams@d4c5d4a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=1} 
|
+------->Toolbar{id=2131296734, res-name=toolbar, visibility=VISIBLE, width=1080, height=154, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=com.google.android.material.appbar.AppBarLayout$LayoutParams@fa67531, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=66.0, child-count=2} 
|
+-------->MaterialTextView{id=2131296735, res-name=toolbarTitle, visibility=VISIBLE, width=108, height=69, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.appcompat.widget.Toolbar$LayoutParams@67b0416, tag=null, root-is-layout-requested=false, has-input-connection=false, x=486.0, y=42.0, text=Ping, input-type=0, ime-target=false, has-links=false} 
|
+-------->AppCompatImageButton{id=-1, visibility=VISIBLE, width=154, height=154, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.appcompat.widget.Toolbar$LayoutParams@ca3a197, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0} 
|
+------>NestedScrollView{id=2131296511, res-name=list, visibility=VISIBLE, width=1080, height=1700, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.coordinatorlayout.widget.CoordinatorLayout$LayoutParams@1bc336d, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=220.0, child-count=1} 
|
+------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=1076, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@97bb1c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=6} 
|
+-------->LinearLayout{id=-1, visibility=VISIBLE, width=1080, height=198, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@f36d08, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=3} 
|
+--------->AppCompatImageView{id=2131296477, res-name=icon, desc=Public Endpoint, visibility=VISIBLE, width=66, height=66, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@f0e0ca1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=44.0, y=66.0} 
|
+--------->MaterialTextView{id=2131296612, res-name=recipient, visibility=VISIBLE, width=838, height=55, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@65a9ec6, tag=null, root-is-layout-requested=false, has-input-connection=false, x=154.0, y=71.0, text=, input-type=0, ime-target=false, has-links=false} 
|
+--------->AppCompatImageView{id=2131296685, res-name=state, desc=Pong pending, visibility=VISIBLE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@41a1e87, tag=null, root-is-layout-requested=false, has-input-connection=false, x=1036.0, y=99.0} 
|
+-------->View{id=-1, visibility=VISIBLE, width=1080, height=1, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@7d651b4, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=198.0} 
|
+-------->FieldView{id=2131296602, res-name=pingIdField, visibility=VISIBLE, width=1080, height=209, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@3d1e152, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=199.0, child-count=1} 
|
+--------->ConstraintLayout{id=-1, visibility=VISIBLE, width=1080, height=209, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@89e577f, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4} 
|
+---------->MaterialTextView{id=2131296492, res-name=labelText, visibility=VISIBLE, width=309, height=203, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@54e234c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=ID, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialTextView{id=2131296752, res-name=valueText, visibility=VISIBLE, width=617, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@9ce5f95, tag=null, root-is-layout-requested=false, has-input-connection=false, x=309.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialButton{id=2131296393, res-name=copy, desc=Copy, visibility=VISIBLE, width=110, height=120, has-focus=false, has-focusable=true, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@3c48aa, tag=null, root-is-layout-requested=false, has-input-connection=false, x=948.0, y=44.0, text=, input-type=0, ime-target=false, has-links=false, is-checked=false} 
|
+---------->View{id=-1, visibility=VISIBLE, width=1080, height=1, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@54aec9b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=208.0} 
|
+-------->FieldView{id=2131296657, res-name=sentAtField, visibility=VISIBLE, width=1080, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@2026011, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=408.0, child-count=1} 
|
+--------->ConstraintLayout{id=-1, visibility=VISIBLE, width=1080, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@8f14302, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4} 
|
+---------->MaterialTextView{id=2131296492, res-name=labelText, visibility=VISIBLE, width=309, height=203, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@6b05413, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Sent at, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialTextView{id=2131296752, res-name=valueText, visibility=VISIBLE, width=771, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@c63c650, tag=null, root-is-layout-requested=false, has-input-connection=false, x=309.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialButton{id=2131296393, res-name=copy, desc=Copy, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@ec80049, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false, is-checked=false} 
|
+---------->View{id=-1, visibility=VISIBLE, width=1080, height=1, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@cb48d4e, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=208.0} 
|
+-------->FieldView{id=2131296445, res-name=expiresAtField, visibility=VISIBLE, width=1080, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@e46f77c, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=617.0, child-count=1} 
|
+--------->ConstraintLayout{id=-1, visibility=VISIBLE, width=1080, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@32a6f81, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4} 
|
+---------->MaterialTextView{id=2131296492, res-name=labelText, visibility=VISIBLE, width=309, height=203, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@5d0f826, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Time out, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialTextView{id=2131296752, res-name=valueText, visibility=VISIBLE, width=771, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@8f96c67, tag=null, root-is-layout-requested=false, has-input-connection=false, x=309.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialButton{id=2131296393, res-name=copy, desc=Copy, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@fe4ba14, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false, is-checked=false} 
|
+---------->View{id=-1, visibility=VISIBLE, width=1080, height=1, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@48d82bd, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=208.0} 
|
+-------->FieldView{id=2131296603, res-name=pongReceivedField, visibility=VISIBLE, width=1080, height=250, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.LinearLayout$LayoutParams@8266803, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=826.0, child-count=1} 
|
+--------->ConstraintLayout{id=-1, visibility=VISIBLE, width=1080, height=250, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@6f537ac, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, child-count=4} 
|
+---------->MaterialTextView{id=2131296492, res-name=labelText, visibility=VISIBLE, width=309, height=250, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@8674c75, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=Pong received at, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialTextView{id=2131296752, res-name=valueText, visibility=VISIBLE, width=771, height=209, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@4c5640a, tag=null, root-is-layout-requested=false, has-input-connection=false, x=309.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false} 
|
+---------->MaterialButton{id=2131296393, res-name=copy, desc=Copy, visibility=GONE, width=0, height=0, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=true, is-enabled=true, is-focused=false, is-focusable=true, is-layout-requested=true, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@642d47b, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=0.0, text=, input-type=0, ime-target=false, has-links=false, is-checked=false} 
|
+---------->View{id=-1, visibility=VISIBLE, width=1080, height=1, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=androidx.constraintlayout.widget.ConstraintLayout$LayoutParams@9542298, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=249.0} 
|
+->View{id=16908336, res-name=navigationBarBackground, visibility=VISIBLE, width=1080, height=132, has-focus=false, has-focusable=false, has-window-focus=true, is-clickable=false, is-enabled=true, is-focused=false, is-focusable=false, is-layout-requested=false, is-selected=false, layout-params=android.widget.FrameLayout$LayoutParams@4ed3af1, tag=null, root-is-layout-requested=false, has-input-connection=false, x=0.0, y=1788.0} 
    at androidx.test.espresso.NoMatchingViewException$Builder.build(NoMatchingViewException.java:5)
    at androidx.test.espresso.base.ViewFinderImpl.getView(ViewFinderImpl.java:26)
    at androidx.test.espresso.ViewInteraction$2.call(ViewInteraction.java:5)
    at androidx.test.espresso.ViewInteraction$2.call(ViewInteraction.java:1)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at android.os.Handler.handleCallback(Handler.java:938)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:223)
    at android.app.ActivityThread.main(ActivityThread.java:7656)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:592)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:947)

https://console.firebase.google.com/u/0/project/awala-ping-android/testlab/histories/bh.6e5c9f23e2ef2570/matrices/5338090043455903581/executions/bs.8fe1913caddc3279/testcases/9/logs

Test 3: tech.relaycorp.ping.ui.peers.AddPublicPeerActivityTest:addPublicPeerSuccessfully

java.lang.AssertionError: Timeout waiting
    at tech.relaycorp.ping.test.WaitAssertions.waitFor(WaitAssertions.kt:19)
    at tech.relaycorp.ping.test.ActivityAssertions.waitForCurrentActivityToBe(ActivityAssertions.kt:32)
    at tech.relaycorp.ping.ui.peers.AddPublicPeerActivityTest.addPublicPeerSuccessfully(AddPublicPeerActivityTest.kt:65)
    ... 39 trimmed
Caused by: org.junit.ComparisonFailure: expected:<...ycorp.ping.ui.peers.[Peers]Activity> but was:<...ycorp.ping.ui.peers.[AddPublicPeer]Activity>
    at org.junit.Assert.assertEquals(Assert.java:115)
    at org.junit.Assert.assertEquals(Assert.java:144)
    at tech.relaycorp.ping.test.ActivityAssertions.assertCurrentActivity(ActivityAssertions.kt:28)
    at tech.relaycorp.ping.test.ActivityAssertions$waitForCurrentActivityToBe$1.invoke(ActivityAssertions.kt:32)
    at tech.relaycorp.ping.test.ActivityAssertions$waitForCurrentActivityToBe$1.invoke(ActivityAssertions.kt:32)
    at tech.relaycorp.ping.test.WaitAssertions.waitFor(WaitAssertions.kt:12)
    ... 42 more

https://console.firebase.google.com/u/0/project/awala-ping-android/testlab/histories/bh.6e5c9f23e2ef2570/matrices/5338090043455903581/executions/bs.8fe1913caddc3279/testcases/2/test-cases

gnarea commented 3 years ago

FYI -- I've just moved this item to the top of the maintenance board, since this is making it so hard to maintain this app.

Filmaluco commented 3 years ago

@gnarea sorry, holiday and another project, I will try to get to this today or tomorrow!

gnarea commented 3 years ago

No worries @Filmaluco! 👍🏾

gnarea commented 3 years ago

@Filmaluco, I just realised that #177 didn't fix the third test in this issue and it's failing again in other PRs, so I'm reopening this issue.

It seems like that PR only addressed two of the three issues.

github-actions[bot] commented 3 years ago

:tada: This issue has been resolved in version 1.2.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket:

Filmaluco commented 2 years ago

@gnarea the 3rd issue was the one with certificates, related to the expiration date. From what we talked about I was under the impression that you said you knew about the issue and had solved it. Should I push the updated certificate...?

gnarea commented 2 years ago

@Filmaluco, I'm pretty sure the expired certificate has nothing to do with that. If it were failing due to the expired certificate, it wouldn't be a flaky test because it'd fail 100% of the time.

From the stacktrace above, I'd imagine it's something to do with the UI. I'm attaching the full logs related to the broken test in case that's relevant, but there's a lot of noise there. flaky-test-log.txt

Filmaluco commented 2 years ago

@gnarea oh, since I was reproducing all the time I did not notice it was also a flaky one. I will take a closer look

gnarea commented 2 years ago

Yeah, the 3rd flaky test is far less frequent than the other two. Also, I've just noticed it seems to only happen on the Pixel 2, API 30.

sdsantos commented 2 years ago

Screenshot 2021-11-24 at 11 14 30

@gnarea seems that 3rd test is not that flaky and it doesn't even have the @AllowFlaky(attempts = 3) annotation. Probably if we add it, it's going to be all green.

By the way, the current test runs seem to have a gcloud account issue: Service account is required to authorize gcloud to access the Cloud Platform.

gnarea commented 2 years ago

@gnarea seems that 3rd test is not that flaky and it doesn't even have the @AllowFlaky(attempts = 3) annotation. Probably if we add it, it's going to be all green.

Indeed, it doesn't break often. I wasn't sure if @AllowFlaky would apply here too but it sounds like it's worth trying that.

By the way, the current test runs seem to have a gcloud account issue: Service account is required to authorize gcloud to access the Cloud Platform.

That's a bug in GitHub Actions :( Sometimes it fails to pass secrets to actions, or passes an empty string. The only workaround is to retry the job :/

github-actions[bot] commented 2 years ago

:tada: This issue has been resolved in version 1.2.1 :tada:

The release is available on:

Your semantic-release bot :package::rocket: