8297798: Timeout with DTLSOverDatagram test template#11558
8297798: Timeout with DTLSOverDatagram test template#11558mpdonova wants to merge 5 commits intoopenjdk:masterfrom
Conversation
|
👋 Welcome back mpdonova! A progress list of the required criteria for merging this PR into |
Webrevs
|
|
Since this fix will address intermittent failures from these 5 tests, can we close those 5 bugs as duplicate of this fix? |
I'm not completely comfortable marking them as duplicate because there are a few different errors going on and I wasn't able to reproduce them. Can we mark mark them as "cannot reproduce" and include a link to this fix? |
| } | ||
| } | ||
|
|
||
| /* |
| } catch (Exception exc) { | ||
| System.out.println("Exception on client side: "); | ||
| e.printStackTrace(System.out); | ||
| exc.printStackTrace(System.out); |
There was a problem hiding this comment.
can we log these stack traces to System.err?
|
|
||
| if (testCase.isGoodJob()) { | ||
| return "Well done, server!"; | ||
| throw e; |
There was a problem hiding this comment.
Why is this flipped, earlier if isGoodJob() returns false then we throw exception.
| e.printStackTrace(System.out); | ||
| clientException = e; | ||
|
|
||
| if (testCase.isGoodJob()) { |
There was a problem hiding this comment.
Same here. Check if this is method is even used and what is the purpose of it. You may not need these checks and would prefer to have no try-catch in this method.
There was a problem hiding this comment.
It is used by InvalidRecords.java test. It expects handshake to fail so overrides this method.
There was a problem hiding this comment.
refactored the code to be a bit cleaner.
The InvalidRecords.java test explicitly threw an exception that is then treated as a successful test run. I refactored the test a little so it only throws an exception if the test fails.
Since all of those related bugs were for timeout, I am fine to close them as duplicate. But no objection to "cannot reproduce" as well. |
| from the server. The server thread had exitted normally so the read _should_ | ||
| succeed. So let's try to read a couple times before giving up. |
There was a problem hiding this comment.
| from the server. The server thread had exitted normally so the read _should_ | |
| succeed. So let's try to read a couple times before giving up. | |
| from the server. The server thread had exited normally so the read _should_ | |
| succeed. So let's try to read a couple of times before giving up. |
| } | ||
|
|
||
| DatagramPacket createHandshakePacket(byte[] ba, SocketAddress socketAddr) { | ||
| DatagramPacket createHandshakePacket(byte[] ba, SocketAddress socketAddr){ |
There was a problem hiding this comment.
| DatagramPacket createHandshakePacket(byte[] ba, SocketAddress socketAddr){ | |
| DatagramPacket createHandshakePacket(byte[] ba, SocketAddress socketAddr) { |
| } | ||
| try { | ||
| testCase.doClientSide(socket, serverSocketAddr); | ||
|
|
|
thanks for the updates! LGTM other than few minor format changes. |
| import java.util.concurrent.atomic.AtomicBoolean; | ||
|
|
||
| /** | ||
| * Test that if handshake messages are crasged, the handshake would fail |
There was a problem hiding this comment.
crasged? Was that supposed to be "changed?"
| if ((ba.length >= 60) && | ||
| if (needInvalidRecords.get() && (ba.length >= 60) && | ||
| (ba[0x00] == (byte)0x16) && (ba[0x0D] == (byte)0x01) && | ||
| (ba[0x3B] == (byte)0x00) && (ba[0x3C] > 0)) { |
There was a problem hiding this comment.
I just want to make sure - this test is only designed to be run for initial handshakes with cookies, not resumed handshakes, correct? I assume that is the intent since this test dates back to the initial DTLS release where resumptions didn't use cookies (that was a recent change to include support for resumption cookies).
There was a problem hiding this comment.
That's correct. The test driver (DTLSOverDataGram) doesn't do session resumption.
|
@mpdonova This change now passes all automated pre-integration checks. ℹ️ This project also has non-automated pre-integration requirements. Please see the file CONTRIBUTING.md for details. After integration, the commit message for the final commit will be: You can use pull request commands such as /summary, /contributor and /issue to adjust it as needed. At the time when this comment was updated there had been 183 new commits pushed to the
As there are no conflicts, your changes will automatically be rebased on top of these commits when integrating. If you prefer to avoid this automatic rebasing, please check the documentation for the /integrate command for further details. As you do not have Committer status in this project an existing Committer must agree to sponsor your change. Possible candidates are the reviewers of this PR (@jnimeh, @rhalade) but any other Committer may sponsor as well. ➡️ To flag this PR as ready for integration with the above commit message, type |
|
/integrate |
|
/sponsor |
|
Going to push as commit 4b313b5.
Your commit was automatically rebased without conflicts. |
This fix is intended to address various time-out errors in tests that use DTLSOverDatagram as a test template. Based on test output from those bugs (JDK-8202059, JDK-8249562, JDK-8280185, JDK-8280186, JDK-8269887, JDK-8268899), this fix:
Ran the following tests 200 times each with no failures.
Progress
Issue
Reviewers
Reviewing
Using
gitCheckout this PR locally:
$ git fetch https://git.openjdk.org/jdk pull/11558/head:pull/11558$ git checkout pull/11558Update a local copy of the PR:
$ git checkout pull/11558$ git pull https://git.openjdk.org/jdk pull/11558/headUsing Skara CLI tools
Checkout this PR locally:
$ git pr checkout 11558View PR using the GUI difftool:
$ git pr show -t 11558Using diff file
Download this PR as a diff file:
https://git.openjdk.org/jdk/pull/11558.diff