Skip to content

Commit

Permalink
Remove REST client tests as they adapted and moved to rest-client-rea…
Browse files Browse the repository at this point in the history
…ctive
  • Loading branch information
jedla97 committed Feb 1, 2024
1 parent 3ff4708 commit ce004ca
Show file tree
Hide file tree
Showing 10 changed files with 0 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ HealthClientService/mp-rest/url=http://localhost:${quarkus.http.port}
HealthClientService/mp-rest/scope=jakarta.inject.Singleton
# FollowRedirect not supported QUARKUS-781
# HealthClientService/mp-rest/followRedirects=true
HttpVersionClientService/mp-rest/url=https://localhost:${quarkus.http.ssl-port}
HttpVersionClientService/mp-rest/scope=jakarta.inject.Singleton
HttpVersionClientService/mp-rest/hostnameVerifier=io.quarkus.restclient.NoopHostnameVerifier
HttpVersionClientService/mp-rest/trustStore=classpath:/META-INF/resources/server.truststore
HttpVersionClientService/mp-rest/trustStorePassword=password
HttpVersionClientServiceAsync/mp-rest/url=https://localhost:${quarkus.http.ssl-port}
HttpVersionClientServiceAsync/mp-rest/scope=jakarta.inject.Singleton
HttpVersionClientServiceAsync/mp-rest/hostnameVerifier=io.quarkus.restclient.NoopHostnameVerifier
HttpVersionClientServiceAsync/mp-rest/trustStore=classpath:/META-INF/resources/server.truststore
HttpVersionClientServiceAsync/mp-rest/trustStorePassword=password
# gRPC
quarkus.grpc.clients.hello.host=localhost
quarkus.grpc.clients.hello.port=${quarkus.http.port}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
Expand All @@ -74,9 +73,6 @@
import io.quarkus.test.bootstrap.RestService;
import io.quarkus.test.scenarios.annotations.DisabledOnNative;
import io.quarkus.test.scenarios.annotations.EnabledOnQuarkusVersion;
import io.quarkus.ts.http.advanced.reactive.clients.HttpVersionClientService;
import io.quarkus.ts.http.advanced.reactive.clients.HttpVersionClientServiceAsync;
import io.quarkus.ts.http.advanced.reactive.clients.RestClientServiceBuilder;
import io.restassured.http.Header;
import io.restassured.response.ValidatableResponse;
import io.smallrye.mutiny.Uni;
Expand All @@ -96,7 +92,6 @@ public abstract class BaseHttpAdvancedReactiveIT {
private static final int RETRY = 3;
private static final String PASSWORD = "password";
private static final String KEY_STORE_PATH = "META-INF/resources/server.keystore";
private static final int ASSERT_TIMEOUT_SECONDS = 10;
private static final String UTF_8_CHARSET = ";charset=UTF-8";
private static final String CONTENT = "content";

Expand Down Expand Up @@ -235,33 +230,6 @@ public void http2Server() throws InterruptedException, URISyntaxException {
assertThat(done.getCount(), equalTo(0L));
}

@Test
@DisplayName("Http/2 Client Sync test")
@Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-658")
public void http2ClientSync() throws Exception {
HttpVersionClientService versionHttpClient = new RestClientServiceBuilder<HttpVersionClientService>(
getAppEndpoint()).withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH)
.build(HttpVersionClientService.class);

Response resp = versionHttpClient.getClientHttpVersion();
assertEquals(SC_OK, resp.getStatus());
assertEquals(HttpVersion.HTTP_2.name(), resp.getHeaderString(HttpClientVersionResource.HTTP_VERSION));
}

@Test
@DisplayName("Http/2 Client Async test")
@Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-658")
public void http2ClientAsync() throws Exception {
HttpVersionClientServiceAsync clientServiceAsync = new RestClientServiceBuilder<HttpVersionClientServiceAsync>(
getAppEndpoint()).withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH)
.build(HttpVersionClientServiceAsync.class);

Response resp = clientServiceAsync.getClientHttpVersion().await().atMost(Duration.ofSeconds(ASSERT_TIMEOUT_SECONDS));

assertEquals(SC_OK, resp.getStatus());
assertEquals(HttpVersion.HTTP_2.name(), resp.getHeaderString(HttpClientVersionResource.HTTP_VERSION));
}

@Test
@DisplayName("Non-application endpoint move to /q/")
@EnabledOnQuarkusVersion(version = "1\\..*", reason = "Redirection is no longer supported in 2.x")
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

10 changes: 0 additions & 10 deletions http/http-advanced/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,6 @@ HealthClientService/mp-rest/url=http://localhost:${quarkus.http.port}
HealthClientService/mp-rest/scope=jakarta.inject.Singleton
# FollowRedirect not supported QUARKUS-781
# HealthClientService/mp-rest/followRedirects=true
HttpVersionClientService/mp-rest/url=https://localhost:${quarkus.http.ssl-port}
HttpVersionClientService/mp-rest/scope=jakarta.inject.Singleton
HttpVersionClientService/mp-rest/hostnameVerifier=io.quarkus.restclient.NoopHostnameVerifier
HttpVersionClientService/mp-rest/trustStore=classpath:/META-INF/resources/server.truststore
HttpVersionClientService/mp-rest/trustStorePassword=password
HttpVersionClientServiceAsync/mp-rest/url=https://localhost:${quarkus.http.ssl-port}
HttpVersionClientServiceAsync/mp-rest/scope=jakarta.inject.Singleton
HttpVersionClientServiceAsync/mp-rest/hostnameVerifier=io.quarkus.restclient.NoopHostnameVerifier
HttpVersionClientServiceAsync/mp-rest/trustStore=classpath:/META-INF/resources/server.truststore
HttpVersionClientServiceAsync/mp-rest/trustStorePassword=password
# gRPC
quarkus.grpc.clients.hello.host=localhost
quarkus.grpc.clients.hello.port=${quarkus.http.port}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@

import org.apache.http.HttpStatus;
import org.junit.jupiter.api.Assertions;
import org.junit.jupiter.api.Disabled;
import org.junit.jupiter.api.DisplayName;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
Expand All @@ -41,9 +40,6 @@
import io.quarkus.test.scenarios.OpenShiftScenario;
import io.quarkus.test.scenarios.QuarkusScenario;
import io.quarkus.test.scenarios.annotations.EnabledOnQuarkusVersion;
import io.quarkus.ts.http.advanced.clients.HttpVersionClientService;
import io.quarkus.ts.http.advanced.clients.HttpVersionClientServiceAsync;
import io.quarkus.ts.http.advanced.clients.RestClientServiceBuilder;
import io.smallrye.mutiny.Uni;
import io.vertx.core.http.HttpVersion;
import io.vertx.core.json.JsonObject;
Expand All @@ -60,7 +56,6 @@ public abstract class BaseHttpAdvancedIT {
private static final int RETRY = 3;
private static final String PASSWORD = "password";
private static final String KEY_STORE_PATH = "META-INF/resources/server.keystore";
private static final int ASSERT_TIMEOUT_SECONDS = 10;
private static final String SSE_ERROR_MESSAGE = "java.lang.ClassNotFoundException: Provider for jakarta.ws.rs.sse.SseEventSource.Builder cannot be found";

protected abstract RestService getApp();
Expand Down Expand Up @@ -151,33 +146,6 @@ public void http2Server() throws InterruptedException, URISyntaxException {
assertThat(done.getCount(), equalTo(0L));
}

@Test
@DisplayName("Http/2 Client Sync test")
@Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-658")
public void http2ClientSync() throws Exception {
HttpVersionClientService versionHttpClient = new RestClientServiceBuilder<HttpVersionClientService>(
getAppEndpoint()).withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH)
.build(HttpVersionClientService.class);

Response resp = versionHttpClient.getClientHttpVersion();
assertEquals(HttpStatus.SC_OK, resp.getStatus());
assertEquals(HttpVersion.HTTP_2.name(), resp.getHeaderString(HttpClientVersionResource.HTTP_VERSION));
}

@Test
@DisplayName("Http/2 Client Async test")
@Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-658")
public void http2ClientAsync() throws Exception {
HttpVersionClientServiceAsync clientServiceAsync = new RestClientServiceBuilder<HttpVersionClientServiceAsync>(
getAppEndpoint()).withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH)
.build(HttpVersionClientServiceAsync.class);

Response resp = clientServiceAsync.getClientHttpVersion().await().atMost(Duration.ofSeconds(ASSERT_TIMEOUT_SECONDS));

assertEquals(HttpStatus.SC_OK, resp.getStatus());
assertEquals(HttpVersion.HTTP_2.name(), resp.getHeaderString(HttpClientVersionResource.HTTP_VERSION));
}

@Test
@DisplayName("Non-application endpoint move to /q/")
@EnabledOnQuarkusVersion(version = "1\\..*", reason = "Redirection is no longer supported in 2.x")
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

0 comments on commit ce004ca

Please sign in to comment.