question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

JSEnvs are only closed after all tests are run in aggregate project

See original GitHub issue

As stated in the README

Executing test will open several browser windows and close them all before the end of the tests.

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 https://github.com/softwaremill/tapir/pull/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:

concurrentRestrictions in Global += Tags.limit(Tags.Test, 1),
Test / parallelExecution := false

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
gzm0commented, Dec 6, 2020

This is unfortunately another shortcoming of sbt.testing._ (although a much more subtle one): There is no resource cleanup hook for resources shared between multiple Frameworks.

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 TestAdapter#close().

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 JSEnv interface). Unless there are objections, I’ll transfer this issue to scala-js/scala-js.

0reactions
gzm0commented, Aug 28, 2022

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).

Read more comments on GitHub >

github_iconTop Results From Across the Web

$project (aggregation) — MongoDB Manual
The $project takes a document that can specify the inclusion of fields, the suppression of the _id field, the addition of new fields,...
Read more >
When to Redis? When to MongoDB? [closed] - Stack Overflow
I would say, it depends on kind of dev team you are and your application needs. For example, if you require a lot...
Read more >
How To Use Aggregations in MongoDB - DigitalOcean
Begin by running the following query, which filters the initial documents coming from the cities collection so the result set will only contain ......
Read more >
MongoDB Aggregations Using Java - Baeldung
In this tutorial, we'll take a dive into the MongoDB Aggregation framework using the ... project, SELECT, selects only the required fields, ...
Read more >
MongoDB Aggregation: tutorial with examples and exercises
Master the MongoDB aggregation pipeline. Follow along with query examples using the most important aggregation stages, and test your skills!
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found