I'm testing a menu item for non-existence (which is relevant as I want to check whether a condition is correctly met which hides the item). Therefore, I call SWTBotRootMenu#contextMenu(String text) throws WidgetNotFoundException in org.junit.jupiter.api.Assertions.assertThrows.
However, having a number of these tests makes running the tests really slow, as the WidgetNotFoundException is thrown only after a 5s timeout it seems.
Is there a way to set the timeout to a shorter value? Or avoid the wait altogether in a different way?
If you just want to check menu for missing item you can get content
SWTBotRootMenu#contextMenu()of whole menu and perform basic check if tested item is present or not.