Closed Bug 1787234 Opened 2 years ago Closed 6 months ago

Android: GleanTestLocalServer state sticks around and influences other tests

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: janerik, Assigned: travis_)

References

Details

Attachments

(1 file)

It looks like using GleanTestLocalServer can cause its state to stick around across test classes, leading to intermittens because data is not received in the right local server.

We should look into whether we can better separate the state between tests.

Priority: -- → P4
Assignee: nobody → tlong
Priority: P4 → P1

Travis, I noticed that in this TestWatcher, we also use initialize the TestWorkManager. Could we employ the same fix to this one as we did in bug 1719905?

I can file a separate bug if that's more convenient instead of using this one.

See Also: → 1719905

Nope I think that fixing that along with addressing any other state issues falls under the scope of this bug, thanks for pointing it out to us, Jonathan!

Turns out I was able to reproduce the issue pretty repeatably with the glean sample app. After adding a way to await the WorkManager executor to complete the tasks and then closing its database, the tests seemed to pass reliably. Hopefully this helps with the problems we have been seeing.

Status: NEW → RESOLVED
Closed: 6 months ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: