[
https://issues.apache.org/jira/browse/DIRMINA-1113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16847944#comment-16847944
]
Emmanuel Lecharny commented on DIRMINA-1113:
--------------------------------------------
It seems that the test is faulty. Here is the {{waitingSessions}} queue, as it
is created :
{noformat}
New session entrey (0x00000002: mina dummy, server, ? => ?)
2
New session entrey (0x00000003: mina dummy, server, ? => ?)
Session removed:(0x00000002: mina dummy, server, ? => ?)
2, 3
New session entrey (0x00000004: mina dummy, server, ? => ?)
3, 4
New session entrey (0x00000005: mina dummy, server, ? => ?)
session1 preferred
5, 4, 3
New session entrey (0x00000006: mina dummy, server, ? => ?)
5, 4, 3, 6
New session entrey (0x00000007: mina dummy, server, ? => ?)
5, 4, 3, 6, 7
New session entrey (0x00000008: mina dummy, server, ? => ?)
Session removed:(0x00000005: mina dummy, server, ? => ?)
5, 4, 3, 6, 7, 8
New session entrey (0x00000009: mina dummy, server, ? => ?)
3, 4, 8, 6, 7, 9
New session entrey (0x0000000A: mina dummy, server, ? => ?)
3, 4, 8, 6, 7, 9, 10
New session entrey (0x00000001: mina dummy, server, ? => ?)
Session removed:(0x00000003: mina dummy, server, ? => ?)
3, 4, 8, 6, 7, 9, 10, 1
New session entrey (0x00000002: mina dummy, server, ? => ?)
4, 6, 8, 1, 7, 9, 10, 2
New session entrey (0x00000005: mina dummy, server, ? => ?)
session1 preferred
session1 preferred
session1 preferred
5, 4, 8, 6, 7, 9, 10, 2, 1
{noformat}
The prefered session is session 5, which is removed at some point, then
re-added. In this case, the session {{lastActivity}} value is changing, and it
appears that when trying later on to check all the sessions, session 3 is
actually older than the new session 5.
> 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
> Fix For: 2.1.3
>
> Attachments: PriorityThreadPoolExecutor-failure.diff
>
>
> 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)