Skip to content

Commit

Permalink
Use pass in timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
Kevin Yen committed May 14, 2016
1 parent 4ea18d0 commit 77e3c5c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apply plugin: 'application'
apply plugin: 'distribution'

version = '1.2'
version = '1.3'

dependencies {
compile group: 'commons-cli', name: 'commons-cli', version: '+'
Expand Down
8 changes: 5 additions & 3 deletions src/main/java/com/liferay/jenkins/tools/JenkinsStatus.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ public class JenkinsStatus {

private static final int THREAD_POOL_SIZE = 120;

private static final int REQUEST_TIMEOUT = 30 * 1000;
private static final int REQUEST_TIMEOUT = 30 * 1000; // miliseconds

private static final int WAIT_TIMEOUT = 300; // seconds

private File serversListFile = new File("servers.list");

Expand Down Expand Up @@ -275,7 +277,7 @@ public void listBuilds() throws Exception {

try {
Set<Job> jobs = JobsGetter.getJobs(
jsonGetter, executor, jenkinsURLs);
jsonGetter, executor, jenkinsURLs, WAIT_TIMEOUT);

Set<Job> matchingJobs = new HashSet<>();

Expand All @@ -296,7 +298,7 @@ public void listBuilds() throws Exception {
matchingJobs.size(), pattern);

Set<Build> builds = BuildsGetter.getBuilds(
jsonGetter, executor, matchingJobs);
jsonGetter, executor, matchingJobs, WAIT_TIMEOUT);

for (Build build : builds) {
boolean match = true;
Expand Down

0 comments on commit 77e3c5c

Please sign in to comment.