[ 
https://issues.apache.org/jira/browse/CAMEL-22541?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18029777#comment-18029777
 ] 

Pasquale Congiusti commented on CAMEL-22541:
--------------------------------------------

More than a flaky test this seems a bug due to some race condition when each 
node tries to access the same lock file:
{code}
Caused by: java.nio.file.FileAlreadyExistsException: 
/tmp/junit-12523123754152312410/my-ns
        at 
java.base/sun.nio.fs.UnixException.translateToIOException(UnixException.java:94)
 ~[?:?]
        at 
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:106) 
~[?:?]
        at 
java.base/sun.nio.fs.UnixException.rethrowAsIOException(UnixException.java:111) 
~[?:?]
        at 
java.base/sun.nio.fs.UnixFileSystemProvider.newByteChannel(UnixFileSystemProvider.java:218)
 ~[?:?]
        at java.base/java.nio.file.Files.newByteChannel(Files.java:380) ~[?:?]
        at java.base/java.nio.file.Files.createFile(Files.java:658) ~[?:?]
        at 
org.apache.camel.component.file.cluster.FileLockClusterView.doStart(FileLockClusterView.java:95)
 ~[camel-file-4.16.0-SNAPSHOT.jar:?]
        at 
org.apache.camel.support.service.BaseService.start(BaseService.java:123) 
~[camel-api-4.16.0-SNAPSHOT.jar:4.16.0-SNAPSHOT]
        ... 26 more
{code}

> [camel-core] Flaky FileLockClusteredRoutePolicyTest unit test
> -------------------------------------------------------------
>
>                 Key: CAMEL-22541
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22541
>             Project: Camel
>          Issue Type: Task
>            Reporter: Pasquale Congiusti
>            Assignee: Pasquale Congiusti
>            Priority: Major
>             Fix For: 4.16.0
>
>
> It happened to me locally and I have observed it on CI execution once.
> {code}
> [INFO] Running 
> org.apache.camel.component.file.cluster.FileLockClusteredRoutePolicyTest
> [ERROR] Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.002 
> s <<< FAILURE! -- in 
> org.apache.camel.component.file.cluster.FileLockClusteredRoutePolicyTest
> [ERROR] 
> org.apache.camel.component.file.cluster.FileLockClusteredRoutePolicyTest.test 
> -- Time elapsed: 0.001 s <<< ERROR!
> java.util.concurrent.RejectedExecutionException: Task 
> java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask@4d5c9525[Not
>  completed, task = 
> java.util.concurrent.Executors$RunnableAdapter@26582a6a[Wrapped task = 
> org.apache.camel.component.file.cluster.FileLockClusteredRoutePolicyTest$$Lambda$1843/0x0000000801f02be0@635aa0c5]]
>  rejected from 
> java.util.concurrent.ScheduledThreadPoolExecutor@3ddd913f[Terminated, pool 
> size = 0, active threads = 0, queued tasks = 0, completed tasks = 3]
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor$AbortPolicy.rejectedExecution(ThreadPoolExecutor.java:2065)
>       at 
> java.base/java.util.concurrent.ThreadPoolExecutor.reject(ThreadPoolExecutor.java:833)
>       at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor.delayedExecute(ScheduledThreadPoolExecutor.java:340)
>       at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor.schedule(ScheduledThreadPoolExecutor.java:562)
>       at 
> java.base/java.util.concurrent.ScheduledThreadPoolExecutor.submit(ScheduledThreadPoolExecutor.java:715)
>       at 
> org.apache.camel.component.file.cluster.FileLockClusteredRoutePolicyTest.test(FileLockClusteredRoutePolicyTest.java:58)
>       at java.base/java.lang.reflect.Method.invoke(Method.java:568)
>       at 
> java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:373)
>       at 
> java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1182)
>       at 
> java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1655)
>       at 
> java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1622)
>       at 
> java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:165)
> {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to