Skip to content
Permalink
Browse files

Fixed JUnit tests for JENKINS-24133 on Windows

  • Loading branch information
pbaranchikov committed Nov 19, 2014
1 parent 12822d8 commit d7e78e24f0228cee9d588cb010bd6485fdfbcc38
Showing with 1 addition and 2 deletions.
  1. +1 −2 src/test/java/hudson/plugins/git/GitSCMTest.java
@@ -1552,14 +1552,13 @@ private void notifyAndCheckBranch(FreeStyleProject project, ObjectId commit,
private boolean notifyCommit(FreeStyleProject project, ObjectId commitId) throws Exception {
final int initialBuildNumber = project.getLastBuild().getNumber();
final String commit1 = ObjectId.toString(commitId);
final URI gitRepo = testRepo.gitDir.toURI();

final int port = server.getConnectors()[0].getLocalPort();
if (port < 0) {
throw new IllegalStateException("Could not locate Jetty server port");
}
final String notificationPath = "http://localhost:" + Integer.toString(port)
+ "/git/notifyCommit?url=" + gitRepo + "&sha1=" + commit1;
+ "/git/notifyCommit?url=" + testRepo.gitDir.toString() + "&sha1=" + commit1;
final URL notifyUrl = new URL(notificationPath);
final InputStream is = notifyUrl.openStream();
IOUtils.toString(is);

0 comments on commit d7e78e2

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