Skip to content

Commit

Permalink
Mention matcher alternative when using Awaitibility
Browse files Browse the repository at this point in the history
  • Loading branch information
Vlatombe committed Nov 27, 2024
1 parent b46b3de commit 8bd3f6c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/org/jvnet/hudson/test/JenkinsRule.java
Original file line number Diff line number Diff line change
Expand Up @@ -1619,6 +1619,9 @@ public static String getLog(Run run) throws IOException {
/**
* Waits for a build to complete.
* Useful in conjunction with {@link BuildWatcher}.
* <p>
* As an alternative, if using <a href="https://github.com/awaitility/awaitility">Awaitibility</a>, you can use {@code await().until(() -> r, RunMatchers.completed());}
*
* @return the same build, once done
* @since 1.607
*/
Expand All @@ -1635,7 +1638,6 @@ public <R extends Run<?,?>> R waitForCompletion(R r) throws InterruptedException
}
}
}
// Could be using com.jayway.awaitility:awaitility but it seems like overkill here.
while (r.isLogUpdated()) {
Thread.sleep(100);
}
Expand Down

0 comments on commit 8bd3f6c

Please sign in to comment.