Skip to content

Errors when executing Runtime subproject tests on Windows #255

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

Closed
gslowikowski opened this issue Apr 28, 2019 · 1 comment
Closed

Errors when executing Runtime subproject tests on Windows #255

gslowikowski opened this issue Apr 28, 2019 · 1 comment

Comments

@gslowikowski
Copy link
Member

gslowikowski commented Apr 28, 2019

When scalac-scoverage-runtime.jvm and scalac-scoverage-runtime.js are being built concurrently, they are trying to create the same files (in the same directories).

This leads to a deadlock, but only on Windows (why?).

Error messages look like this:

[error] scala.scalajs.js.JavaScriptException: Error: EBUSY: resource busy or locked, unlink 'target\invoker-test.measurement0\scoverage.measurements.51'
[error] 	at <jscode>.Object.unlinkSync(fs.js:975)
[error] 	at scalajssupport.NodeFile.$delete([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:21891)
[error] 	at scoverage.InvokerMultiModuleTest.deleteMeasurementFiles([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:56328)
[error] 	at <jscode>.{anonymous}()([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:56094)
[error] 	at scala.scalajs.runtime.AnonFunction0.apply([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:28672)
[error] 	at org.scalatest.BeforeAndAfter.runTest([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:6177)
[error] 	at scoverage.InvokerMultiModuleTest.runTest([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:56336)
[error] 	at <jscode>.{anonymous}()([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:53960)
[error] 	at scala.scalajs.runtime.AnonFunction2.apply([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:28732)
[error] 	at org.scalatest.Engine.traverseSubNodes$1([path-to-project-root]\scalac-scoverage-runtime\js\target\scala-2.12\scalac-scoverage-runtime-test-fastopt.js:7291)

The problem is a consequence of changing Rhino Javascript implementation used in tests to default NodeJS one in commit cfb968c#diff-fdc3abdfd754eeb24090dbd90aeec2ce

The simple workaround is to set fork in Test := true for scalac-scoverage-runtime.jvm (for .js module setting fork to true is not allowed).

I don't like this solution, but will use it for now.

Waiting for better idea.

gslowikowski added a commit that referenced this issue Apr 28, 2019
@ckipp01
Copy link
Member

ckipp01 commented Sep 27, 2021

Tests have now been added for windows. If this pops up again I'll reopen.

@ckipp01 ckipp01 closed this as completed Sep 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants