Skip to content

Commit

Permalink
[JENKINS-37185] Add a test to check timeouts on checkout
Browse files Browse the repository at this point in the history
  • Loading branch information
Quentin Dufour committed Aug 5, 2016
1 parent 4187c8b commit 742861e
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java
Expand Up @@ -3409,6 +3409,20 @@ public void test_checkout() throws Exception {
assertEquals("Wrong SHA1 as checkout of git-client-1.6.0", sha1Expected, sha1);
}

@Bug(37185)
@NotImplementedInJGit /* JGit doesn't have timeout */
public void test_checkout_honor_timeout() throws Exception {
w = clone(localMirror());

int newTimeout = 7;
w.git.checkout().branch("master").ref("origin/master").timeout(newTimeout).deleteBranchIfExist(true).execute();

Map timeouts = new HashMap<Integer, Integer>();
timeouts.put(1, newTimeout);
timeouts.put(4, newTimeout);
setExpectedTimeoutAtPositions(timeouts);
}

@Bug(25353)
@NotImplementedInJGit /* JGit lock file management ignored for now */
public void test_checkout_interrupted() throws Exception {
Expand Down

0 comments on commit 742861e

Please sign in to comment.