дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-27 21:12:34 +02:00
fix(run): count every test when JUnit runs them in parallel (#6377)
With JUnit's parallel concurrent mode, OpenIDEA's JUnit runner could report fewer tests than finished: the listener is called from several worker threads, Reporter's counters were plain ints incremented without a lock and PlatformRunner's start times a HashMap. The counting methods are synchronized now and the start times a ConcurrentHashMap. build.py --test runs a 4000-invocation parallel sample and expects the exact summary. Closes #6334 Co-authored-by: audichuang <[email protected]>
Цей коміт міститься в:
1 джерело
2a26c82357
коміт
e6cb7df653
5 files changed
+34
-8
No files matched your search
@@ -0,0 +1,16 @@
|
||||
package sample;
|
||||
|
||||
import static org.junit.jupiter.api.Assertions.fail;
|
||||
|
||||
import org.junit.jupiter.api.RepeatedTest;
|
||||
|
||||
/** Many tests finishing at once when JUnit runs them in parallel. */
|
||||
class ParallelSampleTest {
|
||||
@RepeatedTest(2000)
|
||||
void passes() {}
|
||||
|
||||
@RepeatedTest(2000)
|
||||
void fails() {
|
||||
fail("no");
|
||||
}
|
||||
}
|
||||
Reference in new issue
Заблокувати користувача