Skip to content

Commit 97fbcd3

Browse files
committed
Attempt to fix flaky tests using guardHttp
1 parent f66c9b1 commit 97fbcd3

File tree

1 file changed

+2
-1
lines changed
  • test/base/src/main/java/org/eclipse/mojarra/test/base

1 file changed

+2
-1
lines changed

test/base/src/main/java/org/eclipse/mojarra/test/base/BaseIT.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,9 @@ protected String getHrefURI(WebElement link) {
111111
}
112112

113113
protected void guardHttp(Runnable action) {
114+
executeScript("window.$http = true");
114115
action.run();
115-
waitUntil(() -> executeScript("return document.readyState=='complete'"));
116+
waitUntil(() -> executeScript("return !window.$http && document.readyState=='complete'"));
116117
}
117118

118119
protected void guardAjax(Runnable action) {

0 commit comments

Comments
 (0)