Skip to content

Commit ef88274

Browse files
committed
Fix UT
On my box this test was failing because mock server hostname was 127.0.0.1 and not localhost
1 parent 103ba60 commit ef88274

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

api/src/test/java/org/sonarsource/scanner/api/internal/ServerConnectionTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ public void should_throw_ISE_if_response_not_successful() throws Exception {
108108
ServerConnection underTest = create(false, false);
109109
assertThatThrownBy(() -> underTest.downloadFile("/batch/index.txt", toFile))
110110
.isInstanceOf(IllegalStateException.class)
111-
.hasMessage(format("Status returned by url [http://localhost:%d/batch/index.txt] is not valid: [400]", server.getPort()));
111+
.hasMessage(format("Status returned by url [http://%s:%d/batch/index.txt] is not valid: [400]", server.getHostName(), server.getPort()));
112112
}
113113

114114
@Test

0 commit comments

Comments
 (0)