Skip to content

Commit

Permalink
Merge pull request #274 from pbaranchikov/detachedSha1
Browse files Browse the repository at this point in the history
Fixed JUnit tests for JENKINS-24133 on Windows
  • Loading branch information
MarkEWaite committed Nov 19, 2014
2 parents 6ab7413 + d7e78e2 commit a1d3f78
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/test/java/hudson/plugins/git/GitSCMTest.java
Expand Up @@ -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);
Expand Down

0 comments on commit a1d3f78

Please sign in to comment.