дзеркало
https://github.com/l0ng-ai/openidea.git
синхронізовано 2026-11-27 21:12:34 +02:00
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]>
17 рядки
329 B
Java
17 рядки
329 B
Java
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");
|
|
}
|
|
}
|