Skip to content

Commit ae3e1bf

Browse files
joshbruninglukeis
authored andcommitted
Fail if an error is not thrown.
Fix test that intends to check that an error is thrown but doesn't. fail() throws an Error which was previously ignored under the same condition that the expected Error was ignored. Signed-off-by: Luke Inman-Semerau <[email protected]>
1 parent 4246126 commit ae3e1bf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

java/client/test/org/openqa/selenium/support/ui/SlowLoadableComponentTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,11 @@ public void testShouldThrowAnErrorIfCallingLoadDoesNotCauseTheComponentToLoadBef
5858
FakeClock clock = new FakeClock();
5959
try {
6060
new BasicSlowLoader(clock, 2).get();
61-
fail();
6261
} catch (Error e) {
6362
// We expect to time out
63+
return;
6464
}
65+
fail();
6566
}
6667

6768
@Test

0 commit comments

Comments
 (0)