UI tests hang after running a certain number of them in a row

Jmix version: 2.1.1
Jmix Studio version: 2.1.0-232
Sample repository URL: GitHub - benoit-blacklane/TestJmix211

Hello all!

We have started to migrate our Jmix application from 2.0.X to 2.1.1 and are facing an issue running the existing tests.
It seems that after a certain number of UI tests, the process running the tests hangs indefinitely.

To check if the problem is coming or not from our setup, I have created a new Jmix project version 2.1.1 and I modified the default UI test from the UserUiTest class with the annotation @RepeatedTest(500).
Then I ran the following command: ./gradlew clean test --tests "UserUiTest"
Around 134 executions, the tests stay stuck.
We tested this very same behaviour on different laptops.

Have you already faced such behaviour?
Do you have any recommendation to solve this or mitigate it?

Many thanks and best regards,
Benoit

Hello!

Thank you for reporting the problem. I’ve created an issue: UI integration tests hang indefinitely after some number of execution · Issue #2572 · jmix-framework/jmix · GitHub

In my case, the problem reproduced only in OS Windows. In Ubuntu all tests are finished successfully. Do you run tests on Windows?

Hello Roman !

Thanks for having a look.
On our side, we ran our tests and monitored this behaviour on Mac and we noticed the tests hanging as well when running them on our CI using the docker environment (see more here Using the Docker execution environment - CircleCI) and the following image cimg/openjdk:17.0.

Hello!

After investigation it turns out that frontend parts are not fully disabled in tests. You can use a workaround until 2.1.2 will be released.

Create test properties in the test resource folder and add vaadin.productionMode=true. Add properties to the test class:

@TestPropertySource("classpath:application-test.properties")