[Bug 64583] New: org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
11 messages Options
Reply | Threaded
Open this post in threaded view
|

[Bug 64583] New: org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
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: [hidden email]
          Reporter: [hidden email]
  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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

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

--- Comment #1 from Konstantin Kolinko <[hidden email]> ---
Created attachment 37352
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37352&action=edit
TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.APR.txt

A log from testing with Java 8 (AdoptOpenJDK jdk-8.0.252.09-hotspot)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #2 from Konstantin Kolinko <[hidden email]> ---
Created attachment 37353
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37353&action=edit
TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.NIO.txt

A log from testing with Java 11 (AdoptOpenJDK jdk-11.0.7.10-hotspot)

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #3 from Konstantin Kolinko <[hidden email]> ---
Searching other mentions of the test class in Bugzilla,
it looks that those checks in the test were added when fixing bug 55127.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

Mark Thomas <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #4 from Mark Thomas <[hidden email]> ---
I see some potential concurrency issues in that test class but I am having
trouble reproducing the issue. I've only managed once out of ~50 runs so far.
If I address the issues I see, can you re-test?

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #5 from Mark Thomas <[hidden email]> ---
OK. Done. Please re-test assuming you are able to.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #6 from Konstantin Kolinko <[hidden email]> ---
Created attachment 37354
  --> https://bz.apache.org/bugzilla/attachment.cgi?id=37354&action=edit
TEST-org.apache.tomcat.websocket.pojo.TestEncodingDecoding.BIO.txt (7.0.x at
90f95ab8, Java 11)

Testing current 7.0.x (at 90f95ab83874dba5a7062fc0bc8803aecaba1937),
thus far I have 1 failure out of {(20 runs with Java 8 + 20 runs with Java 11)
x 3 connectors}.

I am attaching the log file for the failed test.
The test was with Java 11, BIO connector.

Its a different test method that was failing, so this is really a different
issue.
The failure:
[[[
Testcase: testMessagesEndPoints took 0,08 sec
        FAILED
expected:<2> but was:<1>
junit.framework.AssertionFailedError: expected:<2> but was:<1>
        at
org.apache.tomcat.websocket.pojo.TestEncodingDecoding.testMessagesEndPoints(TestEncodingDecoding.java:267)
        at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at
java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
        at
java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
]]]

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #7 from Mark Thomas <[hidden email]> ---
That looks a lot better.

That new failure is in one of the disabled tests that I enabled. Let me see if
I missed something when I reviewed the test.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #8 from Mark Thomas <[hidden email]> ---
Yep. I missed the additional client message. I've updated the test code. It
should pass now.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

Konstantin Kolinko <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |FIXED

--- Comment #9 from Konstantin Kolinko <[hidden email]> ---
Testing current 7.0.x (at 4ac8e86347a6a82133354312e7eb8c1aa09bb129):

I had {(30 runs with Java 8, 60 runs with Java 11, 30 runs with Java 14) x all
3 connectors - on Windows 10}. No issues noted - Testing this test class
completes successfully.

Thus I marking this issue as RESOLVED.

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

[Bug 64583] org.apache.tomcat.websocket.pojo.TestEncodingDecoding / testAnnotatedEndPoints - testEvent fails occasionally

Bugzilla from bugzilla@apache.org
In reply to this post by Bugzilla from bugzilla@apache.org
https://bz.apache.org/bugzilla/show_bug.cgi?id=64583

--- Comment #10 from Rohit Singh <[hidden email]> ---
This post contains useful info in every aspect. Thank you so much for the step
by step practical advice here and in the post, keep regular, Keep posting on a
regular basis and sharing your knowledge with others.
https://www.pragnaspokenenglish.com/

--
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]