testbench icon indicating copy to clipboard operation
testbench copied to clipboard

Not a way to specify when a test is not thread safe

Open manolo opened this issue 5 years ago • 1 comments

Testbench does not consider the standard way of annotation with @NoThreadSafe a class so as only a test is run at once. It neither supports threadCount parameters defined in the failsafe plugin specification. The only way is to define a com.vaadin.testbench.Parameters.testsInParallel property globally

manolo avatar May 06 '19 08:05 manolo

After moving to JUnit5 it is possible to define @ResourceLock per type or method, more details: https://junit.org/junit5/docs/snapshot/user-guide/#writing-tests-parallel-execution-synchronization.

It should solve the issue.

Defining thread count is also possible using JUnit5 parallel properties - junit.jupiter.execution.parallel.config.fixed.parallelism = 2

@manolo - if it's ok for you please close the ticket.

MarcinVaadin avatar Oct 17 '22 08:10 MarcinVaadin