Skip to content

Commit 38630c8

Browse files
committed
fix test
1 parent 74f4862 commit 38630c8

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/test/java/org/htmlunit/libraries/Html2CanvasTest.java

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -97,17 +97,18 @@ private void doTest(final String filename) throws Exception {
9797
private void verify(final Duration maxWaitTime, final WebElement textArea) throws Exception {
9898
final long maxWait = System.currentTimeMillis() + maxWaitTime.toMillis();
9999

100-
String value = "nyi";
100+
String result = "nyi";
101101
while (System.currentTimeMillis() < maxWait) {
102-
value = textArea.getDomProperty("value");
102+
final String value = textArea.getDomProperty("value");
103103
if (value != null && value.startsWith("data:image/png;base64,")) {
104+
result = value;
104105
break;
105106
}
106107

107-
Thread.sleep(50);
108+
Thread.sleep(100);
108109
}
109110

110-
Assertions.assertTrue(value.startsWith(getExpectedAlerts()[0]),
111-
"'" + value + "' does not start with '" + getExpectedAlerts()[0] + "'");
111+
Assertions.assertTrue(result.startsWith(getExpectedAlerts()[0]),
112+
"'" + result + "' does not start with '" + getExpectedAlerts()[0] + "'");
112113
}
113114
}

0 commit comments

Comments
 (0)