-
Notifications
You must be signed in to change notification settings - Fork 42
Closed
Milestone
Description
We are hitting a race condition evaluating RandomizedTest#isNightly. While the RandomizedContext is per thread, the group evaluator is shared and accessed across different ranzomized contexts, hence concurrent calls to GroupEvaluator#isGroupEnabled are not supported.
We get a NullPointerException on the last line despite the test group should be lazily added just before:
return testGroups.get(testGroupAnnotation).enabled;
This is unfortunate and comes from multiple threads calling RandomizedTest#isNightly concurrently. Simply calling the method before forking to multiple threads should fix it on our end, yet there is probably room for a better fix upstream. If the group evaluator is supposed to be shared across threads, perhaps it should be thread-safe?
Metadata
Metadata
Assignees
Labels
No labels