Skip to content
Permalink
Browse files

[JENKINS-37185] Add a test to check timeouts on checkout

  • Loading branch information
superboum committed Aug 5, 2016
1 parent 4187c8b commit 742861e9e83e5775d48f33c99c2827cbe37944ed
Showing with 14 additions and 0 deletions.
  1. +14 −0 src/test/java/org/jenkinsci/plugins/gitclient/GitAPITestCase.java
@@ -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 {

0 comments on commit 742861e

Please sign in to comment.
You can’t perform that action at this time.