android-test icon indicating copy to clipboard operation
android-test copied to clipboard

Orchestrator sometimes runs all the instances of a parameterized test in the same process

Open PhilGlass opened this issue 1 year ago • 0 comments

Description

Orchestrator has a fast path that skips test discovery if the test target is a single method:

https://github.com/android/android-test/blob/dd62f39c79bddbaa3b3c0aad2976ba635a5550ea/runner/android_test_orchestrator/java/androidx/test/orchestrator/AndroidTestOrchestrator.java#L259-L262

This doesn't work for parameterized tests, since even a single method target may expand to any number of parameterized test instances.

Steps to Reproduce

Run a parameterized test method through test orchestrator. They will all run in the same process. You can verify this by logging the PID.

Expected Results

Each instance of the parameterized test runs in its own process.

Actual Results

All of the instances of the parameterized test run in the same process.

PhilGlass avatar Jan 31 '24 12:01 PhilGlass