https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

            Bug ID: 64583
           Summary: org.apache.tomcat.websocket.pojo.TestEncodingDecoding
                    / testAnnotatedEndPoints - testEvent fails
                    occasionally
           Product: Tomcat 7
           Version: trunk
          Hardware: PC
            Status: NEW
          Severity: minor
          Priority: P2
         Component: WebSocket
          Assignee: dev@tomcat.apache.org
          Reporter: knst.koli...@gmail.com
  Target Milestone: ---

Testing RC of Tomcat 7.0.105 I observe occasional failures with
org.apache.tomcat.websocket.pojo.TestEncodingDecoding test.

I do not consider this a showstopper.

The following test fails:

[[[
Testcase: testAnnotatedEndPoints took 5,185 sec
        FAILED
null
junit.framework.AssertionFailedError
        at
org.apache.tomcat.websocket.pojo.TestEncodingDecoding.testEvent(TestEncodingDecoding.java:230)
        at
org.apache.tomcat.websocket.pojo.TestEncodingDecoding.testAnnotatedEndPoints(TestEncodingDecoding.java:164)
]]]

or

[[[
Testcase: testAnnotatedEndPoints took 5,181 sec
        FAILED
null
junit.framework.AssertionFailedError
        at
org.apache.tomcat.websocket.pojo.TestEncodingDecoding.testEvent(TestEncodingDecoding.java:230)
        at
org.apache.tomcat.websocket.pojo.TestEncodingDecoding.testAnnotatedEndPoints(TestEncodingDecoding.java:162)
]]]

1. Note the line number difference:
TestEncodingDecoding.testAnnotatedEndPoints(TestEncodingDecoding.java:164)
TestEncodingDecoding.testAnnotatedEndPoints(TestEncodingDecoding.java:162)

"testEvent()" is a helper method, and the line number in testAnnotatedEndPoints
shows the actual event being tested:

[[[
161   // Should not take very long but some failures have been seen
162   i = testEvent(MsgStringEncoder.class.getName()+":init", 0);
163   i = testEvent(MsgStringDecoder.class.getName()+":init", i);
164   i = testEvent(MsgByteEncoder.class.getName()+":init", i);
165   i = testEvent(MsgByteDecoder.class.getName()+":init", i);
]]]

2. The failures are not reliable.

I observed the failures with AdoptOpenJDK 8u252 (jdk-8.0.252.09-hotspot) 64-bit
and AdoptOpenJDK 11.0.7 (jdk-11.0.7.10-hotspot) on Windows 10 1909.

Out of (1 + 1 + 10) * 3 connectors = 36 runs there are 6 failures, with
different connectors (BIO/NIO/APR). I guess that a connector does not matter.

3. The test could be improved to provide some better diagnostics, instead of
failing on the first error and with no message (null).

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to