-
-
Notifications
You must be signed in to change notification settings - Fork 64
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow parallel test runs with SBT #514
Comments
It started happening after I introduced some tests using jqwik-testing. Removing tests removes the issue. 🤷 |
Latest version of jqwik? |
One more question: Does it happen in the context of concurrent code or is everything in the tests running in a single thread? |
@jlink latwst released. 1.7.4 I'm not sure how SBT runs unit tests, I need to check. Instead of CME, sometimes it's becomes ArrayIndexOutOfBoundException in the same class. Something there is not ready to deal with what SBT is doing. I'll run some more experiments today. |
I deployed a pathetically simple attempt to fix the problem on "1.8.0-SNAPSHOT". |
Let me check. This is ArrayIndexOutOfBoundsException BTW for completeness:
|
@jlink can confirm that |
Then my fix has at least a chance of working. Try 1.8.0-SNAPSHOT. |
On latest snapshot I'm getting this most of the time (arbitrary in question varies from every run):
Some other things I observed less frequently:
|
That all suggests that SBT test parallelisation does things that are not compatible with the way jqwik currently works. I don’t know how fine-grained it can be switched off (eg for jqwik only) and if this has severe performance penalties for your build, though. |
@SimY4 To dive deeper and to enable this kind of parallelisation I'd need a test field for exploring SBT parallelisation. If you find the time to provide a minimum project using SBT running several jqwik tests, I'll look into the underlying problems. Not now, but when 1.8.0 will be done and deployed. |
Assumption: SBT is using several instances of the test engine concurrently. Probably via several launcher instances or starting launches in parallel threads. Potential Problems
|
@jlink I reproduced it on this project: https://github.com/SimY4/coregex Steps to reproduce:
|
@SimY4 Many thanks |
Testing Problem
Getting this error quite frequently. Not sure why. Running tests from SBT, nothing was updated recently except SBT itself.
The text was updated successfully, but these errors were encountered: