android / android/android-test

Espresso does not wait for AndroidX's ListAdapter's by default

Aperta
#382 1 commento 20 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
Java
Stelle
1.2k
Fork
342
Merge medio
11h 29m
PR unite (30g)
2

Descrizione

### Description

Included `androidx.recyclerview.widget.ListAdapter` performs asynchronous operations in the background. However, Espresso does not appear to be aware of it and thus tests can fail if async list diff is still diffing while Espresso starts inspecting views.

### Steps to Reproduce

1. Download [RecyclerTest.zip](https://github.com/android/android-test/files/3264598/RecyclerTest.zip)
2. Run ExampleInstrumentedTest couple of times, at least one test will fail eventually

### Expected Results

Espresso should wait for built-in ListAdapter to finish diffing

### Actual Results

Espresso does not wait and can fail the test

Guida per i contributori

Apri la guida per i contributori

Direzione di ricerca

Scarica RecyclerTest.zip ed esegui ripetutamente ExampleInstrumentedTest per riprodurre il fallimento intermittente. Traccia il modo in cui Espresso si sincronizza con il diffing asincrono di androidx.recyclerview.widget.ListAdapter. Il lavoro è completato quando Espresso attende il termine del diffing integrato di ListAdapter e il test riprodotto non fallisce più in modo intermittente.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Valutazione

Stack tecnologico
java
Ambito
mobile, testing
Tipo di issue
Bug
Difficoltà
3/5
Tempo stimato
1-2 giorni
Stato di attività
Ferma
Chiarezza
Abbastanza chiara
Idoneità per principianti
42/100

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.