On Tue, 19 Sep 2023 18:35:12 GMT, Phil Race <p...@openjdk.org> wrote:
>> Refactored timeout handling in PassFailJFrame: >> >> 1. Managing the timer and formatting the time left is inside >> `TimeoutHandler` class. >> 2. The class handles timer events and updates the label accordingly. >> >> This is implemented on top of #15665. > > test/jdk/java/awt/regtesthelpers/PassFailJFrame.java line 329: > >> 327: timer.stop(); >> 328: testFailedReason = FAILURE_REASON >> 329: + "Timeout User did not perform >> testing."; > > If the test was explicitly failed by the user (ie failed==true), why does the > reason say that there was a time out ? Huh, it's a good question. I didn't notice it. It's the original code that I moved into a dedicated class. It shouldn't change the failure reason if it's already set. The timer isn't stopped in handlers for the failure, so it's possible that timer changes it. We should also stop the timer explicitly when failure or success is handled. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/15668#discussion_r1330570808