diff options
author | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-07-03 08:46:12 +0200 |
---|---|---|
committer | Thomas Wolf <thomas.wolf@paranor.ch> | 2018-07-03 13:54:32 +0200 |
commit | 55ebb83c987930e0985eda8ee3b0f6a1d8c22830 (patch) | |
tree | 102573cea22984e7731b8bfe57c9b9121f469cc8 /org.eclipse.jgit.http.test/tst/org | |
parent | cc20d7e33d68d4f368c8873016a432a1f272ddee (diff) | |
download | jgit-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.java | 8 |
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)); } } } |