-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Speed up partest #6391
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
Speed up partest #6391
Conversation
- Explicitly add test output path to the compiler classpath Rather than assuming its in the application classpath. - Ensure tests cleanup threads - Fork tests that inherently require it or ones that I can't figure out how to make work without it
Tests that take 30+ seconds to compile and/or execute really add up to a productivity loss for contributors. These tests served a purpose to show that the corresponding changes were correct. But if we want them to serve an ongoing purpose of guarding against regressions, they need to be maintained to do so more quicky or be moved into a test suite that is run less frequently.
The last two commits won't build until scala/scala-partest#99 is reviewed, merged, and released in Partest 1.1.6. My intention is that the prior commits should build successfully: the changes to the tests should be made in a backwards compatible way. In other words, all tests must support forked execution. |
To test out this change, you need to:
Things to test: the test failure modes all still work (output differs from checkfile, |
@@ -1,269 +0,0 @@ | |||
object foo { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks. I had been debating removing this from about a day after I introduced it, but I didn't want to make a "delete a test" PR.
/rebuild |
I rebuilt to measure the best-case timing on an uncontended worker. (The first build landed in the third and final executor slot a worker already building another validate-main job and the community build). The rebuild took 24 minutes (note that rebuilds take a shortcut by skipping a previously successful We've still got a race condition in our System property handling:
Another thread in another part of partest, which is compiling files, is iterating through the System properties and detects a concurrent modification. I saw that locally, and thought I'd fixed it by avoiding mutating the System property map in place, and instead swapping in a brand new, fully built But looking at this again, there is no safe publication, so the other thread could see a stale value for |
70239c1
to
318821d
Compare
…replaced or mutated
In addition to trying to use |
This should go in 2.12.x eventually - why did you pick 2.13.x for this PR? |
Originally I assumed there was more divergence between the partest versions used on 2.12 and 2.13, but that appears not to be a problem. I've rebased this PR as #6413 to target 2.12.x, we can see how it fares. Probably best to defer until after the 2.12.5 release to be on the safe side. |
I also needed to backport 9c7362b to 2.12.x. |
Closing in favour of the 2.12.x targetted PR, #6413 |
Prepares for, and then switches to, partest 1.1.7 which
includes a mode to run tests without forking.
Removes some resource hungry tests. Volunteers sought to revive
these in more frugal form.