Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
[FIXED JENKINS-26399] [JENKINS-25975] Merged #1609.
Originally-Committed-As: 9ac2257d0a3fa86928267a82d69d55c5a4e423c1
- Loading branch information
|
@@ -45,7 +45,7 @@ |
|
|
* Should work in combination with {@link JenkinsRule} or {@link RestartableJenkinsRule}. |
|
|
* @see JenkinsRule#waitForCompletion |
|
|
* @see JenkinsRule#waitForMessage |
|
|
* @since TODO |
|
|
* @since 1.607 |
|
|
*/ |
|
|
public final class BuildWatcher extends ExternalResource { |
|
|
|
|
|
|
@@ -1152,7 +1152,7 @@ public static String getLog(Run run) throws IOException { |
|
|
* Waits for a build to complete. |
|
|
* Useful in conjunction with {@link BuildWatcher}. |
|
|
* @return the same build, once done |
|
|
* @since TODO |
|
|
* @since 1.607 |
|
|
*/ |
|
|
public <R extends Run<?,?>> R waitForCompletion(R r) throws InterruptedException { |
|
|
// Could be using com.jayway.awaitility:awaitility but it seems like overkill here. |
|
@@ -1166,7 +1166,7 @@ public static String getLog(Run run) throws IOException { |
|
|
* Waits for a build log to contain a specified string. |
|
|
* Useful in conjunction with {@link BuildWatcher}. |
|
|
* @return the same build, once it does |
|
|
* @since TODO |
|
|
* @since 1.607 |
|
|
*/ |
|
|
public <R extends Run<?,?>> R waitForMessage(String message, R r) throws IOException, InterruptedException { |
|
|
while (!getLog(r).contains(message)) { |
|
|