File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/test/java/org/htmlunit/javascript Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -1184,7 +1184,7 @@ public void shutdownShouldKill() throws Exception {
11841184 try (WebClient webClient = getWebClient ()) {
11851185 // there is no way to kill a thread in later JDK's
11861186 // to make the test running we need a final timeout for js stuff
1187- webClient .setJavaScriptTimeout (DEFAULT_WAIT_TIME * 20 );
1187+ webClient .setJavaScriptTimeout (DEFAULT_WAIT_TIME * 10 );
11881188
11891189 final List <String > collectedAlerts = new ArrayList <>();
11901190 webClient .setAlertHandler (new CollectingAlertHandler (collectedAlerts ));
@@ -1195,7 +1195,13 @@ public void shutdownShouldKill() throws Exception {
11951195
11961196 }
11971197 Thread .sleep (400 );
1198- assertTrue (getJavaScriptThreads ().isEmpty ());
1198+ try {
1199+ assertTrue (getJavaScriptThreads ().isEmpty ());
1200+ }
1201+ catch (final AssertionError e ) {
1202+ Thread .sleep (DEFAULT_WAIT_TIME * 10 );
1203+ assertTrue (getJavaScriptThreads ().isEmpty ());
1204+ }
11991205 }
12001206
12011207 /**
You can’t perform that action at this time.
0 commit comments