Replies: 2 comments 2 replies
-
You didn't mention it explicitly, but I assume you are using JUnit 5 with the Cucumber JUnit Platform Engine. I also assume you are executing in parallel. The Cucumber JUnit Platform Engine uses the JUnit Platform and the platform handles parallel execution. So there isn't much we can do from the Cucumber side. The current JUnit implementation uses a fork join pool and does not utilize a queue. So most of what you suggest would be impossible. Instead fork join pool aims to keep the number of executing threads constant. Now I also assume you might have set the max parallelism to the desired parallelism, in which case you'd run out of threads should any become blocked. If so, you've presumably done this because you want to limit the usage/creation of some thread bound resources. Then you'll want to read: junit-team/junit-framework#3108 I don't think it has definitve answers, but should provide a lot of context and perhaps some inspiration. Again without knowing more about your situation it's hard to advice. The solution could be anywhere in the range from making your resources explicit (e.g. use https://commons.apache.org/proper/commons-pool/) to a feature requests and or pull requests with JUnit. |
Beta Was this translation helpful? Give feedback.
-
We are not using the junit, but the cli with the --threads parameter. We are currently using the random seed, but want a sort of pseudo random as described above. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I have multiple test cases running steps at the same time and the test case order is randomized. However, I would like to know if there is a way to change the order before a test case is ran when certain conditions are met.
For example:
A. I want to look ahead at the tags
B. if a locked resource is being used, I want to instead get the next scheduled test on the list instead.
C. Then push the skipped ones back on the front of the queue while tests are running.
Forgive me if there is already a similar discussion, I could not find one.
Beta Was this translation helpful? Give feedback.
All reactions