Uploaded image for project: 'Apache Taverna'
  1. Apache Taverna
  2. TAVERNA-919

robundle.ValidatorTest fails with cannot access the file because it is being used by another process

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Done
    • Major
    • Resolution: Done
    • language 0.15.1
    • language 0.15.1
    • Taverna Language
    • None

    Description

      Building https://dist.apache.org/repos/dist/dev/incubator/taverna/source/taverna-language-0.15.1-incubating-RC2/ on Windows using

      mvn clean install -T2.0C
      

      (e.g. 8 concurrent threads)

      fails with:

      Running org.apache.taverna.robundle.validator.ValidatorTest
      Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.466 sec <<< FAILURE! - in org.apache.taverna.robundle.validator.ValidatorTest
      test(org.apache.taverna.robundle.validator.ValidatorTest)  Time elapsed: 0.162 sec  <<< ERROR!
      java.nio.file.FileSystemException: C:\Users\stain\AppData\Local\Temp\test6307194291383462110.bundle.zip: The process cannot access the file because it is being used by another process.
      
              at sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:86)
              at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:97)
              at sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:102)
              at sun.nio.fs.WindowsFileSystemProvider.implDelete(WindowsFileSystemProvider.java:269)
              at sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:103)
              at java.nio.file.Files.delete(Files.java:1126)
              at org.apache.taverna.robundle.validator.ValidatorTest.test(ValidatorTest.java:54)
      
      
      Results :
      
      Tests in error:
        ValidatorTest.test:54 ยป FileSystem C:\Users\stain\AppData\Local\Temp\test63071...
      
      Tests run: 98, Failures: 0, Errors: 1, Skipped: 1
      

      Some kind of concurrency issue deep inside java.io.File? Suggestion is to update test to use java.nio.file.Path which avoids the need to delete a temporary file for making a temporary directory.

      Attachments

        Issue Links

          Activity

            People

              stain Stian Soiland-Reyes
              stain Stian Soiland-Reyes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: