-
Notifications
You must be signed in to change notification settings - Fork 383
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
JSEnvs are only closed after all tests are run in aggregate project #4317
Comments
AFAIK, there is no way to force that using configuration. The only way is to execute the tests of each project in a separate sbt command. Browsers will be cleaned after each sbt command completes (literally in the |
This is unfortunately another shortcoming of In Scala.js' sbt plugin, we might have the option to intercept sbt's testing infrastructure more deeply and get a better point to call The obvious downside of this would of course be that we'd rely on much more internal details of how sbt executes tests. IMHO, this is a Scala.js core issue (notably, it is, in my opinion, not an issue with the |
Workaround until scala-js/scala-js#4317 has a solution
I have asked about this on sbt/sbt: sbt/sbt#6603 |
Note to self: We could build a heuristic that stops all JSEnvs (per This is less clean, but likely solves the problem. |
After having attempted to build said heuristic, I'm not comfortable proceeding: From what I can see, it has the potential to worsen currently working use cases (notably the workaround to this very issue). |
As stated in the README
This behavior seems to cause spawning a lot of browser processes when running
test
in an aggregate project, which are only stopped after all tests have finished.Since switching to Firefox in softwaremill/tapir#860 due to scala-js/scala-js-env-selenium#119/#105, this causes issues on memory constrained CI runners. Firefox seems to be a bit more memory hungry than Chrome, so we're only seeing this now but the behavior is the same in Chrome as well.
Is there a way to terminate browser processes after each test run or after the tests of single subproject have finished, when running test on an aggregate project in sbt?
Note that in parallel execution is already disabled in the build:
The text was updated successfully, but these errors were encountered: