Uploaded image for project: 'WildFly Core'
  1. WildFly Core
  2. WFCORE-3869

[jdk10] DeletionCollisionTest#testFileLockByRemoveContent failure

XMLWordPrintable

      org.jboss.as.repository.DeletionCollisionTest#testFileLockByRemoveContent from deployment-repository module of wildfly-core fails with JDK10, works fine with JDK9.

      reproduce

      wildfly-core]$ mvn  test -Dtest=DeletionCollisionTest#testFileLockByRemoveContent -pl deployment-repository
      ...
      [INFO] Running org.jboss.as.repository.DeletionCollisionTest
      [ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.307 s <<< FAILURE! - in org.jboss.as.repository.DeletionCollisionTest
      [ERROR] testFileLockByRemoveContent(org.jboss.as.repository.DeletionCollisionTest)  Time elapsed: 0.301 s  <<< FAILURE!
      java.lang.AssertionError
      	at org.junit.Assert.fail(Assert.java:86)
      	at org.junit.Assert.assertTrue(Assert.java:41)
      	at org.junit.Assert.assertTrue(Assert.java:52)
      	at org.jboss.as.repository.DeletionCollisionTest.testFileLockByRemoveContent(DeletionCollisionTest.java:117)
      ...
      

      Exception expected by the test - WFLYDR0019

      Caused by: org.jboss.as.repository.ExplodedContentException: WFLYDR0019: Deployment is locked by another operation
      	at org.jboss.as.repository.ContentRepositoryImpl.readContent(ContentRepositoryImpl.java:550)
      	at org.jboss.as.repository.DeletionCollisionTest.lambda$testFileLockByRemoveContent$3(DeletionCollisionTest.java:111)
      	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
      	at java.lang.Thread.run(Thread.java:748)
      

      Actual exception thrown with JDK10

      Caused by: org.jboss.as.repository.ExplodedContentException: WFLYDR0020: Error accessing deployment files
      	at org.jboss.as.repository.ContentRepositoryImpl.readContent(ContentRepositoryImpl.java:563)
      	at org.jboss.as.repository.DeletionCollisionTest.lambda$testFileLockByRemoveContent$3(DeletionCollisionTest.java:111)
      	at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1135)
      	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:635)
      	at java.base/java.lang.Thread.run(Thread.java:844)
      Caused by: java.io.FileNotFoundException: target
      	at org.jboss.as.repository.PathUtil.getFile(PathUtil.java:376)
      	at org.jboss.as.repository.PathUtil.getFile(PathUtil.java:374)
      	at org.jboss.as.repository.PathUtil.getFile(PathUtil.java:374)
      	at org.jboss.as.repository.PathUtil.getFile(PathUtil.java:374)
      	at org.jboss.as.repository.PathUtil.getFile(PathUtil.java:374)
      	at org.jboss.as.repository.PathUtil.getFile(PathUtil.java:374)
      	at org.jboss.as.repository.PathUtil.readFile(PathUtil.java:356)
      	at org.jboss.as.repository.ContentRepositoryImpl.readContent(ContentRepositoryImpl.java:554)
      	... 5 more
      

      Environment:

      Apache Maven 3.5.3 (3383c37e1f9e9b3bc3df5050c29c8aff9f295297; 2018-02-24T20:49:05+01:00)
      Maven home: /usr/lib/maven
      Java version: 10.0.1, vendor: Oracle Corporation
      

      Byteman is being involved in the test.

              ropalka Richard Opalka
              pkremens@redhat.com Petr Kremensky (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: