You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Emmanuel Lecharny (JIRA)" <ji...@apache.org> on 2019/05/23 20:47:00 UTC

[jira] [Commented] (DIRMINA-1113) Random failure on PriorityThreadPoolExecutorTest.testPrioritisation

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

Emmanuel Lecharny commented on DIRMINA-1113:
--------------------------------------------

I think there is a possible collision as we compare two milliseconds which are generated using {{System.currentTimeMillis()}}, and we have a 20ms wait. The thing is that {{System.currentTimeMillis()}} accuracy is more or less 10ms (it depends on the OS though), so waiting for 20 ms offer a slight opportunity to have both time to be equal.

> Random failure on PriorityThreadPoolExecutorTest.testPrioritisation
> -------------------------------------------------------------------
>
>                 Key: DIRMINA-1113
>                 URL: https://issues.apache.org/jira/browse/DIRMINA-1113
>             Project: MINA
>          Issue Type: Bug
>    Affects Versions: 2.0.22, 2.1.2
>            Reporter: Emmanuel Lecharny
>            Priority: Major
>
> We have random failure when running {{mvn clean install}} :
> {noformat}
> ...
> [ERROR] Tests run: 5, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 38.815 s <<< FAILURE! - in org.apache.mina.filter.executor.PriorityThreadPoolExecutorTest
> [ERROR] testPrioritisation(org.apache.mina.filter.executor.PriorityThreadPoolExecutorTest)  Time elapsed: 38.815 s  <<< FAILURE!
> java.lang.AssertionError: All other sessions should have finished later than the preferred session (but at least one did not).
> 	at org.apache.mina.filter.executor.PriorityThreadPoolExecutorTest.testPrioritisation(PriorityThreadPoolExecutorTest.java:214)
> [INFO] Running org.apache.mina.filter.keepalive.KeepAliveFilterTest
> [INFO] Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 12.02 s - in org.apache.mina.filter.keepalive.KeepAliveFilterTest
> [INFO] Running org.apache.mina.filter.logging.MdcInjectionFilterTest
> [INFO] Tests run: 7, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 11.118 s - in org.apache.mina.filter.logging.MdcInjectionFilterTest
> [INFO] Running org.apache.mina.filter.buffer.BufferedWriteFilterTest
> [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.002 s - in org.apache.mina.filter.buffer.BufferedWriteFilterTest
> [INFO] 
> [INFO] Results:
> [INFO] 
> [ERROR] Failures: 
> [ERROR]   PriorityThreadPoolExecutorTest.testPrioritisation:214 All other sessions should have finished later than the preferred session (but at least one did not).
> [INFO] 
> [ERROR] Tests run: 214, Failures: 1, Errors: 0, Skipped: 8
> ...
> {noformat}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)