[
https://issues.apache.org/jira/browse/DIRMINA-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16847111#comment-16847111
]
Emmanuel Lecharny commented on DIRMINA-1113:
--------------------------------------------
No, this is not the cause.
If I print what happens in the {{UnfairComparator.compare()}} method, the test
will fail if the second parameter is the preferred session.
{code:java}
@Override
public int compare(IoSession o1, IoSession o2) {
if (o1 == preferred) {
System.out.println( "O1 prefered" );
return -1;
}
if (o2 == preferred) {
System.out.println( "O2 prefered" );
return 1;
}
return 0;
}
{code}
generally prints :
{noformat}
O1 prefered
O1 prefered
{noformat}
and the test succeed, but when it prints :
{noformat}
O1 prefered
O1 prefered
O2 prefered
{noformat}
the test fails in this case. I have no idea why it happens (and it's quite
rare)...
> 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)