summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.http.test/tst/org
diff options
context:
space:
mode:
authorThomas Wolf <thomas.wolf@paranor.ch>2018-07-03 08:46:12 +0200
committerThomas Wolf <thomas.wolf@paranor.ch>2018-07-03 13:54:32 +0200
commit55ebb83c987930e0985eda8ee3b0f6a1d8c22830 (patch)
tree102573cea22984e7731b8bfe57c9b9121f469cc8 /org.eclipse.jgit.http.test/tst/org
parentcc20d7e33d68d4f368c8873016a432a1f272ddee (diff)
downloadjgit-55ebb83c987930e0985eda8ee3b0f6a1d8c22830.tar.gz
jgit-55ebb83c987930e0985eda8ee3b0f6a1d8c22830.zip
Add response message, if any, on HTTP status 404
Try to give as much information as possible. The connection's response message might contain additional hints as to why the connection could not be established. Bug: 536541 Change-Id: I7230e4e0be9417be8cedeb8aaab35186fcbf00a5 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
Diffstat (limited to 'org.eclipse.jgit.http.test/tst/org')
-rw-r--r--org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
index ef059bf2a3..61f272c4cd 100644
--- a/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
+++ b/org.eclipse.jgit.http.test/tst/org/eclipse/jgit/http/test/HttpClientTests.java
@@ -175,7 +175,9 @@ public class HttpClientTests extends HttpTestCase {
} catch (NoRemoteRepositoryException err) {
String exp = uri + ": " + uri
+ "/info/refs?service=git-upload-pack not found";
- assertEquals(exp, err.getMessage());
+ assertNotNull(err.getMessage());
+ assertTrue("Unexpected error message",
+ err.getMessage().startsWith(exp));
}
}
}
@@ -191,7 +193,9 @@ public class HttpClientTests extends HttpTestCase {
} catch (NoRemoteRepositoryException err) {
String exp = uri + ": " + uri
+ "/info/refs?service=git-upload-pack not found";
- assertEquals(exp, err.getMessage());
+ assertNotNull(err.getMessage());
+ assertTrue("Unexpected error message",
+ err.getMessage().startsWith(exp));
}
}
}