scala / scala-dev

Scala 2 team issues. Not for user-facing bugs or directly actionable user-facing improvements. For build/test/infra and for longer-term planning and idea tracking. Our bug tracker is at https://github.com/scala/bug/issues
Apache License 2.0
130 stars 14 forks source link

Regression: scala.reflect.io.ZipArchiveTest consistently fails on Windows #724

Closed SethTisue closed 4 years ago

SethTisue commented 4 years ago

first failed run https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-windows/1896/

[error] Test scala.reflect.io.ZipArchiveTest.URL$u0020archive$u0020works failed: java.nio.file.FileSystemException: y:\jenkins\tmp\junit618511732972925268.zip: The process cannot access the file because it is being used by another process. [error] , took 0.014 sec

som-snytt commented 4 years ago

I forgot that the fix was buried in the Using infrastructure.

https://github.com/scala/scala/blob/v2.13.3/src/testkit/scala/tools/testkit/TempDir.scala#L43

som-snytt commented 4 years ago

I wonder why that code doesn't attempt to register a shutdown hook for file deletion in the isWindows case.

Also there should be an alias for isWindows called whyWeCantHaveNiceThings.

SethTisue commented 4 years ago

probably fixed by scala/scala#9236, but let's leave this open until that's confirmed over at https://scala-ci.typesafe.com/view/scala-2.12.x/job/scala-2.12.x-integrate-windows/

som-snytt commented 4 years ago

Hey, it worked! fsdow.

This made me fire up the old cygwin I installed last spring, when pandemic lockdown was a passing thing. Now I have a couple dozen cygwin64/tmp/junit* files from April and yesterday.