Integrated: 7130: JfrThreadsPageTest (UI-test) fails (part 2)

Alex Macdonald aptmac at openjdk.java.net
Fri Feb 5 19:11:37 UTC 2021


On Thu, 4 Feb 2021 22:27:23 GMT, Alex Macdonald <aptmac at openjdk.org> wrote:

> This PR is related to JMC-7077, and is a continuation of the fix for JMC-7063 [1].
> 
> After updating the `JfrThreadsPageTest` tests to better handle timestamps, Bipin mentioned in JMC-7077 [0] that some tests were still failing due to focusing issues. This PR attempts to address these issues, by adding checks to make sure the ui is a sufficient size to run the tests that require interaction with the canvases. I've chosen to label this fix as 7063 part 2, because JMC-7077 is loaded and isn't only concerned with these changes. Let me know if this works, otherwise I can change the commit message and PR title.
> 
> Now there is a new function in the test class to verify that the controls are visible. It does this by first checking the scrolled composite for a horizontal scrollbar (if there is one then some widgets may not be visible), and then checks the height of the ChartCanvas to ensure that the lanes can be interacted with. If the ui is not large enough for this criteria, then the tests are skipped using `Assume.assumeTrue()` in the specific unit tests. I've played around with varying ui dimensions by altering the height/width values in `ApplicationWorkbenchWindowAdvisor.java`, and the tests look to be skipped when appropriate.
> 
> For example, I set the width to be 600px, and the resulting test run:
> Tests run: 10, Failures: 0, Errors: 0, Skipped: 6, Time elapsed: 112.402 s - in org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest
> testHideAllThreads(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest) skipped
> testTextCanvasSelection(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest) skipped
> testZoom(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest) skipped
> testFoldingChart(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest)  Time elapsed: 20.694 s
> testFoldingTable(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest)  Time elapsed: 10.219 s
> testMenuItemEnablement(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest) skipped
> testInvalidFoldingActions(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest)  Time elapsed: 9.268 s
> testResetButtons(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest) skipped
> testTimeFilterInvalid(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest) skipped
> testPersistingSashWeights(org.openjdk.jmc.flightrecorder.uitest.JfrThreadsPageTest)  Time elapsed: 15.607 s
> 
> [0] https://bugs.openjdk.java.net/browse/JMC-7077
> [1] https://github.com/openjdk/jmc/commit/8d6fb1b70f96c52f3bd71584ddca287c802e1f6f

This pull request has now been integrated.

Changeset: 3645eb1c
Author:    Alex Macdonald <aptmac at openjdk.org>
URL:       https://git.openjdk.java.net/jmc/commit/3645eb1c
Stats:     157 lines in 6 files changed: 153 ins; 0 del; 4 mod

7130: JfrThreadsPageTest (UI-test) fails (part 2)

Reviewed-by: hirt

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

PR: https://git.openjdk.java.net/jmc/pull/209


More information about the jmc-dev mailing list