jmx-dev RFR: 8319238: JMX ThreadPoolAccTest.java is too verbose and should fail before timeout

Kevin Walls kevinw at openjdk.org
Thu Nov 2 18:19:05 UTC 2023


On Thu, 2 Nov 2023 15:47:00 GMT, Serguei Spitsyn <sspitsyn at openjdk.org> wrote:

>> Discovered while testing changes that made this test fail.  The test failure is hard to diagnose as it logs and retries at full speed, possibly forever, until timeout.  This can hit a log file limit.  We can save thousands of lines of text being printed when the test runs normally and successfully, by waiting half a second before doing the Principal-checking which is the purpose of the test.
>
> test/jdk/javax/management/monitor/ThreadPoolAccTest.java line 167:
> 
>> 165:             String expected = principals[i / 3];
>> 166: 
>> 167:             echo("testPrincipals: monitored: " + monitored[i] + " principal: " + principal + " expected: " + expected);
> 
> With this in place, should printing of principal at line 176 be removed?

Right, it is duplicated.  That new line is useful, I really wanted to see something before we check for null.
Then we have the existing printing before we check further, which I did not disturb.  I'm sure it's not a big deal either way.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/16456#discussion_r1380610946


More information about the jmx-dev mailing list