Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
slide committed Apr 8, 2016
1 parent fcdebe5 commit 1c60167
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
11 changes: 8 additions & 3 deletions test/src/test/java/hudson/PluginManagerTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -404,12 +404,17 @@ private void dynamicLoad(String plugin) throws IOException, InterruptedException

// wait for all the download jobs to complete
boolean done = true;
boolean passed = true;
do {
Thread.sleep(100);
for(UpdateCenterJob job : r.jenkins.getUpdateCenter().getJobs()) {
done = true;
for(UpdateCenterJob job : r.jenkins.getUpdateCenter().getJobs()) {
if(job instanceof UpdateCenter.DownloadJob) {
done &= ((UpdateCenter.DownloadJob)job).status.isSuccess();
}
UpdateCenter.DownloadJob j = (UpdateCenter.DownloadJob)job;
assertFalse(j.status instanceof UpdateCenter.DownloadJob.Failure);
done &= !(((j.status instanceof UpdateCenter.DownloadJob.Pending) ||
(j.status instanceof UpdateCenter.DownloadJob.Installing)));
}
}
} while(!done);

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
updateCenter.post(
{"connectionCheckUrl":"http://www.google.com/", // has to be here because updateDirectly sniffs only very limited formats
{"connectionCheckUrl":"http://www.google.com/",
"core": {
"buildDate": "Dec 31, 1969",
"name": "core",
Expand Down Expand Up @@ -27,7 +27,7 @@ updateCenter.post(
"releaseTimestamp": "2016-04-04T16:26:54.00Z",
"requiredCore": "1.565",
"scm": "github.com",
"sha1": "5Ffulp5hSySnUL3gs427m6wVFJ4=",
"sha1": "XWJpfL8B2x7qrISJg7IY2ZTPxFk=",
"title": "Credentials Plugin",
"url": "credentials.hpi",
"version": "1.27",
Expand Down

0 comments on commit 1c60167

Please sign in to comment.