JAVA-2824 Fix tests in Java 9 and above modules (Update after PR review)

This commit is contained in:
mikr
2020-10-29 22:01:15 +01:00
parent 39af870a1a
commit 6f6c86d9a7
5 changed files with 36 additions and 33 deletions

View File

@@ -18,6 +18,7 @@ import java.security.NoSuchAlgorithmException;
import java.time.Duration;
import org.junit.Test;
import org.junit.jupiter.api.Disabled;
public class HttpRequestUnitTest {
@@ -52,8 +53,8 @@ public class HttpRequestUnitTest {
* This test will fail as soon as the given URL returns a HTTP 2 response.
* Therefore, let's leave it commented out.
* */
/* @Test
@Test
@Disabled
public void shouldFallbackToHttp1_1WhenWebsiteDoesNotUseHttp2() throws IOException, InterruptedException, URISyntaxException, NoSuchAlgorithmException {
HttpRequest request = HttpRequest.newBuilder()
.uri(new URI("https://postman-echo.com/get"))
@@ -65,7 +66,7 @@ public class HttpRequestUnitTest {
.send(request, HttpResponse.BodyHandlers.ofString());
assertThat(response.version(), equalTo(HttpClient.Version.HTTP_1_1));
}*/
}
@Test
public void shouldReturnStatusOKWhenSendGetRequestWithDummyHeaders() throws IOException, InterruptedException, URISyntaxException {