diff --git a/external-applications/src/test/java/io/quarkus/ts/external/applications/OpenShiftWorkshopHeroesIT.java b/external-applications/src/test/java/io/quarkus/ts/external/applications/OpenShiftWorkshopHeroesIT.java index dd31f9558..33f6b1e41 100644 --- a/external-applications/src/test/java/io/quarkus/ts/external/applications/OpenShiftWorkshopHeroesIT.java +++ b/external-applications/src/test/java/io/quarkus/ts/external/applications/OpenShiftWorkshopHeroesIT.java @@ -46,10 +46,6 @@ public class OpenShiftWorkshopHeroesIT { @Container(image = "${postgresql.13.image}", port = POSTGRESQL_PORT, expectedLog = "listening on IPv4 address") static PostgresqlService database = new PostgresqlService() - //fixme https://github.com/quarkus-qe/quarkus-test-framework/issues/455 - .withProperty("POSTGRES_USER", "user") - .withProperty("POSTGRES_PASSWORD", "user") - .withProperty("POSTGRES_DB", "mydb") .withProperty("PGDATA", "/tmp/psql"); @GitRepositoryQuarkusApplication(repo = "https://github.com/quarkusio/quarkus-workshops.git", branch = "5bb433fb7a2c8d80dda88dac9dcabc50f7494dc3", contextDir = "quarkus-workshop-super-heroes/super-heroes/rest-heroes", mavenArgs = "-Dquarkus.package.type=uber-jar -DskipTests -Dquarkus.platform.group-id=${QUARKUS_PLATFORM_GROUP-ID} -Dquarkus.platform.version=${QUARKUS_VERSION}") diff --git a/helm/helm-minimum/src/test/java/io/quarkus/ts/helm/minimum/OpenShiftHelmSimpleAppIT.java b/helm/helm-minimum/src/test/java/io/quarkus/ts/helm/minimum/OpenShiftHelmSimpleAppIT.java index 326c998e5..23f3df366 100644 --- a/helm/helm-minimum/src/test/java/io/quarkus/ts/helm/minimum/OpenShiftHelmSimpleAppIT.java +++ b/helm/helm-minimum/src/test/java/io/quarkus/ts/helm/minimum/OpenShiftHelmSimpleAppIT.java @@ -25,8 +25,7 @@ import io.restassured.RestAssured; @OpenShiftScenario -// Helm is concerned just about image name, Native compilation is not relevant -@DisabledOnNative +@DisabledOnNative(reason = "Helm is only concerned with image name, Native compilation is not relevant") public class OpenShiftHelmSimpleAppIT { private static final Logger LOG = Logger.getLogger(OpenShiftHelmSimpleAppIT.class); diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/BaseResteasyIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/BaseResteasyIT.java index 2d542917a..2135eab34 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/BaseResteasyIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/BaseResteasyIT.java @@ -1,13 +1,13 @@ package io.quarkus.ts.http.hibernate.validator; import static io.restassured.RestAssured.given; -import static org.hamcrest.Matchers.containsString; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.apache.http.HttpStatus; import io.restassured.http.ContentType; import io.restassured.response.Response; -import io.restassured.response.ValidatableResponse; public abstract class BaseResteasyIT { @@ -22,33 +22,58 @@ public abstract class BaseResteasyIT { private static final String EXPECTED_VALIDATOR_ERROR_MESSAGE = "numeric value out of bounds"; - protected void assertBadRequestInJsonFormat(String path) { - assertBadRequestInJsonFormat(given().get(path)); + protected static ResponseValidator validate(String path) { + return BaseResteasyIT.validate(given().get(path)); } - protected void assertBadRequestInJsonFormat(Response response) { - isBadRequest(response) - .contentType(ContentType.JSON) - .body("parameterViolations[0].message", containsString(EXPECTED_VALIDATOR_ERROR_MESSAGE)); + protected static ResponseValidator validate(Response response) { + return new ResponseValidator(response); } - protected void assertBadRequestInXmlFormat(Response response) { - isBadRequest(response) - .contentType(ContentType.XML) - .body("violationReport.parameterViolations.message", containsString(EXPECTED_VALIDATOR_ERROR_MESSAGE)); - } + static class ResponseValidator { + final Response response; - protected void assertBadRequestInTextFormat(String path) { - assertBadRequestInTextFormat(given().get(path)); - } + private ResponseValidator(Response response) { + this.response = response; + } - protected void assertBadRequestInTextFormat(Response response) { - isBadRequest(response) - .contentType(ContentType.TEXT) - .body(containsString(EXPECTED_VALIDATOR_ERROR_MESSAGE)); - } + protected ResponseValidator isBadRequest() { + assertEquals(HttpStatus.SC_BAD_REQUEST, response.statusCode()); + return this; + } + + protected ResponseValidator hasReactiveJsonError() { + response.then().contentType(ContentType.JSON); + assertEquals(EXPECTED_VALIDATOR_ERROR_MESSAGE, response.body().jsonPath().getString("violations[0].message")); + return this; + } + + protected ResponseValidator hasClassicJsonError() { + response.then().contentType(ContentType.JSON); + assertEquals(EXPECTED_VALIDATOR_ERROR_MESSAGE, + response.body().jsonPath().getString("parameterViolations[0].message")); + return this; + } + + protected ResponseValidator hasReactiveXMLError() { + response.then().contentType(ContentType.XML); + assertEquals(EXPECTED_VALIDATOR_ERROR_MESSAGE, + response.body().xmlPath().getString("violationReport.violations.message")); + return this; + } + + protected ResponseValidator hasClassicXMLError() { + response.then().contentType(ContentType.XML); + assertEquals(EXPECTED_VALIDATOR_ERROR_MESSAGE, + response.body().xmlPath().getString("violationReport.parameterViolations.message")); + return this; + } - private ValidatableResponse isBadRequest(Response response) { - return response.then().statusCode(HttpStatus.SC_BAD_REQUEST); + protected ResponseValidator hasTextError() { + response.then().contentType(ContentType.TEXT); + String body = response.body().asString(); + assertTrue(body.contains(EXPECTED_VALIDATOR_ERROR_MESSAGE), body); + return this; + } } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonAndXmlIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonAndXmlIT.java index 03623eed2..cce799177 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonAndXmlIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonAndXmlIT.java @@ -26,24 +26,32 @@ public class ResteasyClassicUsingJsonAndXmlIT extends BaseResteasyIT { */ @Test public void validateDefaultMediaType() { - assertBadRequestInJsonFormat(CLASSIC_ENDPOINT_WITH_NO_PRODUCES); + validate(CLASSIC_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasClassicJsonError(); } @Test public void validateMultipleMediaTypesUsingAcceptXml() { Response response = given().accept(ContentType.XML).get(CLASSIC_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInXmlFormat(response); + validate(response) + .isBadRequest() + .hasClassicXMLError(); } @Test public void validateMultipleMediaTypesUsingAcceptJson() { Response response = given().accept(ContentType.JSON).get(CLASSIC_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInJsonFormat(response); + validate(response) + .isBadRequest() + .hasClassicJsonError(); } @Test public void validateMultipleMediaTypesUsingAcceptText() { Response response = given().accept(ContentType.TEXT).get(CLASSIC_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInTextFormat(response); + validate(response) + .isBadRequest() + .hasTextError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonIT.java index 9e5afbe16..6a3b112a0 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingJsonIT.java @@ -20,6 +20,8 @@ public class ResteasyClassicUsingJsonIT extends BaseResteasyIT { @Test public void validateDefaultMediaType() { - assertBadRequestInJsonFormat(CLASSIC_ENDPOINT_WITH_NO_PRODUCES); + validate(CLASSIC_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasClassicJsonError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingTextIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingTextIT.java index 9c9410bad..da25ec8cc 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingTextIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingTextIT.java @@ -20,6 +20,8 @@ public class ResteasyClassicUsingTextIT extends BaseResteasyIT { @Test public void validateDefaultMediaType() { - assertBadRequestInTextFormat(CLASSIC_ENDPOINT_WITH_NO_PRODUCES); + validate(CLASSIC_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasTextError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingXmlIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingXmlIT.java index bfd0642df..7c38e471b 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingXmlIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyClassicUsingXmlIT.java @@ -25,18 +25,24 @@ public class ResteasyClassicUsingXmlIT extends BaseResteasyIT { @Test public void validateDefaultMediaType() { // The default media type is TEXT which looks wrong for me, but it's how has been designed following the TCK standard. - assertBadRequestInTextFormat(CLASSIC_ENDPOINT_WITH_NO_PRODUCES); + validate(CLASSIC_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasTextError(); } @Test public void validateMultipleMediaTypesUsingAcceptXml() { Response response = given().accept(ContentType.XML).get(CLASSIC_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInXmlFormat(response); + validate(response) + .isBadRequest() + .hasClassicXMLError(); } @Test public void validateMultipleMediaTypesUsingAcceptText() { Response response = given().accept(ContentType.TEXT).get(CLASSIC_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInTextFormat(response); + validate(response) + .isBadRequest() + .hasTextError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonAndXmlIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonAndXmlIT.java index 12bb705ff..67bcdc064 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonAndXmlIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonAndXmlIT.java @@ -1,7 +1,10 @@ package io.quarkus.ts.http.hibernate.validator; import static io.restassured.RestAssured.given; +import static org.hamcrest.CoreMatchers.containsString; +import org.apache.http.HttpStatus; +import org.junit.jupiter.api.Assertions; import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; @@ -13,7 +16,6 @@ import io.restassured.http.ContentType; import io.restassured.response.Response; -@Disabled("Wrong MediaType resolution in Resteasy Reactive: https://github.com/quarkusio/quarkus/issues/20888") @QuarkusScenario public class ResteasyReactiveUsingJsonAndXmlIT extends BaseResteasyIT { @@ -23,29 +25,45 @@ public class ResteasyReactiveUsingJsonAndXmlIT extends BaseResteasyIT { }) static final RestService app = new RestService(); - /** - * When JSON and XML library are present, default is JSON - */ @Test public void validateDefaultMediaType() { - assertBadRequestInJsonFormat(REACTIVE_ENDPOINT_WITH_NO_PRODUCES); + validate(REACTIVE_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasTextError(); } @Test public void validateMultipleMediaTypesUsingAcceptXml() { Response response = given().accept(ContentType.XML).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInXmlFormat(response); + validate(response) + .isBadRequest() + .hasReactiveXMLError(); } @Test public void validateMultipleMediaTypesUsingAcceptJson() { Response response = given().accept(ContentType.JSON).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInJsonFormat(response); + validate(response) + .isBadRequest() + .hasReactiveJsonError(); } @Test public void validateMultipleMediaTypesUsingAcceptText() { Response response = given().accept(ContentType.TEXT).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInTextFormat(response); + validate(response) + .isBadRequest() + .hasTextError(); + } + + @Test + @Disabled("https://github.com/quarkusio/quarkus/issues/28421") + public void validateReturnValue() { + Response response = given() + .accept(ContentType.TEXT) + .get("/reactive/validate-response-uni/mouse"); + Assertions.assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, //https://github.com/quarkusio/quarkus/issues/28422 + response.statusCode()); + response.then().body(containsString("response must have 3 characters")); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonIT.java index f2bb34de3..3d6915fd0 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingJsonIT.java @@ -2,7 +2,6 @@ import static io.restassured.RestAssured.given; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import io.quarkus.test.bootstrap.RestService; @@ -14,7 +13,6 @@ import io.restassured.http.ContentType; import io.restassured.response.Response; -@Disabled("Wrong MediaType resolution in Resteasy Reactive: https://github.com/quarkusio/quarkus/issues/20888") @DisabledOnNative(reason = "Due to high native build execution time") @QuarkusScenario public class ResteasyReactiveUsingJsonIT extends BaseResteasyIT { @@ -26,18 +24,24 @@ public class ResteasyReactiveUsingJsonIT extends BaseResteasyIT { @Test public void validateDefaultMediaType() { - assertBadRequestInJsonFormat(REACTIVE_ENDPOINT_WITH_NO_PRODUCES); + validate(REACTIVE_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasTextError(); } @Test public void validateMultipleMediaTypesUsingAcceptJson() { Response response = given().accept(ContentType.JSON).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInJsonFormat(response); + validate(response) + .isBadRequest() + .hasReactiveJsonError(); } @Test public void validateMultipleMediaTypesUsingAcceptText() { Response response = given().accept(ContentType.TEXT).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInTextFormat(response); + validate(response) + .isBadRequest() + .hasTextError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingTextIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingTextIT.java index 499698967..90260a979 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingTextIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingTextIT.java @@ -10,7 +10,6 @@ import io.quarkus.test.services.QuarkusApplication; import io.quarkus.ts.http.hibernate.validator.sources.ReactiveResource; -@Disabled("Wrong MediaType resolution in Resteasy Reactive: https://github.com/quarkusio/quarkus/issues/20888") @DisabledOnNative(reason = "Due to high native build execution time") @QuarkusScenario public class ResteasyReactiveUsingTextIT extends BaseResteasyIT { @@ -21,7 +20,10 @@ public class ResteasyReactiveUsingTextIT extends BaseResteasyIT { static final RestService app = new RestService(); @Test + @Disabled("https://github.com/quarkusio/quarkus/issues/28324") public void validateDefaultMediaType() { - assertBadRequestInTextFormat(REACTIVE_ENDPOINT_WITH_NO_PRODUCES); + validate(REACTIVE_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasTextError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingXmlIT.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingXmlIT.java index b63e826a7..02cd2c191 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingXmlIT.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/ResteasyReactiveUsingXmlIT.java @@ -14,7 +14,6 @@ import io.restassured.http.ContentType; import io.restassured.response.Response; -@Disabled("Wrong MediaType resolution in Resteasy Reactive: https://github.com/quarkusio/quarkus/issues/20888") @DisabledOnNative(reason = "Due to high native build execution time") @QuarkusScenario public class ResteasyReactiveUsingXmlIT extends BaseResteasyIT { @@ -25,20 +24,26 @@ public class ResteasyReactiveUsingXmlIT extends BaseResteasyIT { static final RestService app = new RestService(); @Test + @Disabled("https://github.com/quarkusio/quarkus/issues/28324") public void validateDefaultMediaType() { - // The default media type is TEXT which looks wrong for me, but it's how has been designed following the TCK standard. - assertBadRequestInTextFormat(REACTIVE_ENDPOINT_WITH_NO_PRODUCES); + validate(REACTIVE_ENDPOINT_WITH_NO_PRODUCES) + .isBadRequest() + .hasTextError(); } @Test public void validateMultipleMediaTypesUsingAcceptXml() { Response response = given().accept(ContentType.XML).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInXmlFormat(response); + validate(response) + .isBadRequest() + .hasReactiveXMLError(); } @Test public void validateMultipleMediaTypesUsingAcceptText() { Response response = given().accept(ContentType.TEXT).get(REACTIVE_ENDPOINT_WITH_MULTIPLE_PRODUCES); - assertBadRequestInTextFormat(response); + validate(response) + .isBadRequest() + .hasTextError(); } } diff --git a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/sources/ReactiveResource.java b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/sources/ReactiveResource.java index 505d35539..4043d5e31 100644 --- a/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/sources/ReactiveResource.java +++ b/http/hibernate-validator/src/test/java/io/quarkus/ts/http/hibernate/validator/sources/ReactiveResource.java @@ -1,8 +1,11 @@ package io.quarkus.ts.http.hibernate.validator.sources; +import javax.validation.Valid; import javax.validation.constraints.Digits; +import javax.validation.constraints.Size; import javax.ws.rs.GET; import javax.ws.rs.Path; +import javax.ws.rs.PathParam; import javax.ws.rs.Produces; import javax.ws.rs.core.MediaType; @@ -27,4 +30,12 @@ public Uni validateMultipleProduces( @Digits(integer = 5, fraction = 0, message = "numeric value out of bounds") @RestPath("id") String id) { return Uni.createFrom().item(id); } -} \ No newline at end of file + + @GET + @Path("/validate-response-uni/{content}") + @Valid + @Size(min = 3, max = 3, message = "response must have 3 characters") + public Uni uniEcho(@PathParam("content") String content) { + return Uni.createFrom().item(content); + } +} diff --git a/http/http-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/ClientResource.java b/http/http-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/ClientResource.java new file mode 100644 index 000000000..233071d5c --- /dev/null +++ b/http/http-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/ClientResource.java @@ -0,0 +1,22 @@ +package io.quarkus.ts.http.advanced.reactive; + +import javax.inject.Inject; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.core.Response; + +import org.eclipse.microprofile.rest.client.inject.RestClient; + +import io.smallrye.mutiny.Uni; + +@Path("/client") +public class ClientResource { + @Inject + @RestClient + HealthClientService client; + + @GET + public Uni get() { + return client.health(); + } +} diff --git a/http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/clients/HealthClientService.java b/http/http-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/HealthClientService.java similarity index 63% rename from http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/clients/HealthClientService.java rename to http/http-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/HealthClientService.java index d441250d5..4e7476d0c 100644 --- a/http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/clients/HealthClientService.java +++ b/http/http-advanced-reactive/src/main/java/io/quarkus/ts/http/advanced/reactive/HealthClientService.java @@ -1,4 +1,4 @@ -package io.quarkus.ts.http.advanced.reactive.clients; +package io.quarkus.ts.http.advanced.reactive; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -6,10 +6,12 @@ import org.eclipse.microprofile.rest.client.inject.RegisterRestClient; +import io.smallrye.mutiny.Uni; + @RegisterRestClient public interface HealthClientService { @GET - @Path("/health") - Response health(); + @Path("/q/health") + Uni health(); } diff --git a/http/http-advanced-reactive/src/main/resources/application.properties b/http/http-advanced-reactive/src/main/resources/application.properties index 24dced5cc..ff0e6a6d9 100644 --- a/http/http-advanced-reactive/src/main/resources/application.properties +++ b/http/http-advanced-reactive/src/main/resources/application.properties @@ -54,6 +54,8 @@ quarkus.keycloak.policy-enforcer.paths.hello.path=/api/hello/* quarkus.keycloak.policy-enforcer.paths.hello.enforcement-mode=DISABLED quarkus.keycloak.policy-enforcer.paths.grpc.path=/api/grpc/* quarkus.keycloak.policy-enforcer.paths.grpc.enforcement-mode=DISABLED +quarkus.keycloak.policy-enforcer.paths.client.path=/api/client/* +quarkus.keycloak.policy-enforcer.paths.client.enforcement-mode=DISABLED quarkus.oidc.client-id=test-application-client quarkus.oidc.credentials.secret=test-application-client-secret # tolerate 1 minute of clock skew between the Keycloak server and the application diff --git a/http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/BaseHttpAdvancedReactiveIT.java b/http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/BaseHttpAdvancedReactiveIT.java index 806050a5f..c5bbab329 100644 --- a/http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/BaseHttpAdvancedReactiveIT.java +++ b/http/http-advanced-reactive/src/test/java/io/quarkus/ts/http/advanced/reactive/BaseHttpAdvancedReactiveIT.java @@ -65,7 +65,6 @@ import io.quarkus.test.bootstrap.RestService; import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; import io.quarkus.test.scenarios.annotations.EnabledOnQuarkusVersion; -import io.quarkus.ts.http.advanced.reactive.clients.HealthClientService; 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; @@ -174,13 +173,9 @@ public void nonAppRedirections() { } @Test - @Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-781") public void microprofileHttpClientRedirection() throws Exception { - HealthClientService healthHttpClient = new RestClientServiceBuilder(getAppEndpoint()) - .withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH) - .build(HealthClientService.class); - - assertThat(SC_OK, equalTo(healthHttpClient.health().getStatus())); + io.restassured.response.Response health = getApp().given().get("api/client"); + assertEquals(HttpStatus.SC_OK, health.statusCode()); } @Test diff --git a/http/http-advanced/src/main/java/io/quarkus/ts/http/advanced/ClientResource.java b/http/http-advanced/src/main/java/io/quarkus/ts/http/advanced/ClientResource.java new file mode 100644 index 000000000..d62a7b4f4 --- /dev/null +++ b/http/http-advanced/src/main/java/io/quarkus/ts/http/advanced/ClientResource.java @@ -0,0 +1,21 @@ +package io.quarkus.ts.http.advanced; + +import javax.inject.Inject; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.core.Response; + +import org.eclipse.microprofile.rest.client.inject.RestClient; + +@Path("/client") +public class ClientResource { + + @Inject + @RestClient + HealthClientService client; + + @GET + public Response get() { + return client.health(); + } +} diff --git a/http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/clients/HealthClientService.java b/http/http-advanced/src/main/java/io/quarkus/ts/http/advanced/HealthClientService.java similarity index 79% rename from http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/clients/HealthClientService.java rename to http/http-advanced/src/main/java/io/quarkus/ts/http/advanced/HealthClientService.java index a0038d8f7..c4b1b8019 100644 --- a/http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/clients/HealthClientService.java +++ b/http/http-advanced/src/main/java/io/quarkus/ts/http/advanced/HealthClientService.java @@ -1,4 +1,4 @@ -package io.quarkus.ts.http.advanced.clients; +package io.quarkus.ts.http.advanced; import javax.ws.rs.GET; import javax.ws.rs.Path; @@ -10,6 +10,6 @@ public interface HealthClientService { @GET - @Path("/health") + @Path("/q/health") Response health(); } diff --git a/http/http-advanced/src/main/resources/application.properties b/http/http-advanced/src/main/resources/application.properties index ac5a43670..03931d41d 100644 --- a/http/http-advanced/src/main/resources/application.properties +++ b/http/http-advanced/src/main/resources/application.properties @@ -48,10 +48,12 @@ quarkus.keycloak.policy-enforcer.paths.details.path=/api/details/* quarkus.keycloak.policy-enforcer.paths.details.enforcement-mode=DISABLED quarkus.keycloak.policy-enforcer.paths.grpc.path=/api/grpc/* quarkus.keycloak.policy-enforcer.paths.grpc.enforcement-mode=DISABLED +quarkus.keycloak.policy-enforcer.paths.client.path=/api/client/* +quarkus.keycloak.policy-enforcer.paths.client.enforcement-mode=DISABLED quarkus.oidc.client-id=test-application-client quarkus.oidc.credentials.secret=test-application-client-secret # tolerate 1 minute of clock skew between the Keycloak server and the application quarkus.oidc.token.lifespan-grace=60 # Disable PremierLeagueContainerRequestFilter unless it should be applied -pl-container-request-filter.enabled=false \ No newline at end of file +pl-container-request-filter.enabled=false diff --git a/http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/BaseHttpAdvancedIT.java b/http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/BaseHttpAdvancedIT.java index a30107fde..757a918e7 100644 --- a/http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/BaseHttpAdvancedIT.java +++ b/http/http-advanced/src/test/java/io/quarkus/ts/http/advanced/BaseHttpAdvancedIT.java @@ -38,7 +38,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.HealthClientService; import io.quarkus.ts.http.advanced.clients.HttpVersionClientService; import io.quarkus.ts.http.advanced.clients.HttpVersionClientServiceAsync; import io.quarkus.ts.http.advanced.clients.RestClientServiceBuilder; @@ -186,13 +185,9 @@ public void nonAppRedirections() { } @Test - @Disabled("blocked by: https://issues.redhat.com/browse/QUARKUS-781") - public void microprofileHttpClientRedirection() throws Exception { - HealthClientService healthHttpClient = new RestClientServiceBuilder(getAppEndpoint()) - .withHostVerified(true).withPassword(PASSWORD).withKeyStorePath(KEY_STORE_PATH) - .build(HealthClientService.class); - - assertThat(HttpStatus.SC_OK, equalTo(healthHttpClient.health().getStatus())); + public void microprofileHttpClientRedirection() { + io.restassured.response.Response health = getApp().given().get("api/client"); + assertEquals(HttpStatus.SC_OK, health.statusCode()); } @Test diff --git a/http/http-minimum-reactive/src/test/java/io/quarkus/ts/http/minimum/reactive/DevModeHttpMinimumReactiveIT.java b/http/http-minimum-reactive/src/test/java/io/quarkus/ts/http/minimum/reactive/DevModeHttpMinimumReactiveIT.java index 05ec3955e..8dbc166ee 100644 --- a/http/http-minimum-reactive/src/test/java/io/quarkus/ts/http/minimum/reactive/DevModeHttpMinimumReactiveIT.java +++ b/http/http-minimum-reactive/src/test/java/io/quarkus/ts/http/minimum/reactive/DevModeHttpMinimumReactiveIT.java @@ -12,13 +12,11 @@ import io.quarkus.test.bootstrap.DevModeQuarkusService; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; import io.quarkus.test.services.DevModeQuarkusApplication; import io.quarkus.test.utils.AwaitilityUtils; @Tag("QUARKUS-1026") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Continuous Testing was entered in 2.x") @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class DevModeHttpMinimumReactiveIT { diff --git a/http/http-minimum/src/test/java/io/quarkus/ts/http/minimum/DevModeHttpMinimumIT.java b/http/http-minimum/src/test/java/io/quarkus/ts/http/minimum/DevModeHttpMinimumIT.java index 6a579106b..3923ba122 100644 --- a/http/http-minimum/src/test/java/io/quarkus/ts/http/minimum/DevModeHttpMinimumIT.java +++ b/http/http-minimum/src/test/java/io/quarkus/ts/http/minimum/DevModeHttpMinimumIT.java @@ -12,13 +12,11 @@ import io.quarkus.test.bootstrap.DevModeQuarkusService; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; import io.quarkus.test.services.DevModeQuarkusApplication; import io.quarkus.test.utils.AwaitilityUtils; @Tag("QUARKUS-1026") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Continuous Testing was entered in 2.x") @TestMethodOrder(MethodOrderer.OrderAnnotation.class) public class DevModeHttpMinimumIT { diff --git a/http/jaxrs-reactive/src/test/java/io/quarkus/ts/http/jaxrs/reactive/HttpCachingIT.java b/http/jaxrs-reactive/src/test/java/io/quarkus/ts/http/jaxrs/reactive/HttpCachingIT.java index 40738de3a..166def52d 100644 --- a/http/jaxrs-reactive/src/test/java/io/quarkus/ts/http/jaxrs/reactive/HttpCachingIT.java +++ b/http/jaxrs-reactive/src/test/java/io/quarkus/ts/http/jaxrs/reactive/HttpCachingIT.java @@ -13,7 +13,6 @@ import org.junit.jupiter.api.Test; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; import io.restassured.response.ValidatableResponse; @Tag("QUARKUS-1075") @@ -41,7 +40,6 @@ public void shouldGetCacheControlAllAttributes() { containsString("private")))); } - @DisabledOnQuarkusVersion(version = "2.2.1.*", reason = "https://github.com/quarkusio/quarkus/issues/19822") @Test public void shouldGetNoCacheUnqualified() { whenGet("/nocache-unqualified").header(HttpHeaders.CACHE_CONTROL, is("no-cache")); diff --git a/http/reactive-routes/src/main/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandler.java b/http/reactive-routes/src/main/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandler.java index 5a93e4711..0203212a4 100644 --- a/http/reactive-routes/src/main/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandler.java +++ b/http/reactive-routes/src/main/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandler.java @@ -1,7 +1,6 @@ package io.quarkus.ts.http.reactiveroutes.validation; import javax.validation.Valid; -import javax.validation.constraints.Size; import io.quarkus.vertx.web.Route; import io.quarkus.vertx.web.Route.HttpMethod; @@ -25,13 +24,6 @@ Uni validateUniResponseWithTypeReturnsInvalidID() { return Uni.createFrom().item(response); } - @Route(methods = HttpMethod.GET, path = "/response-uni-invalid-string") - @Valid - @Size(min = 3, max = 3, message = "response must have 3 characters") - Uni validateUniResponseWithStringReturnsInvalidSize() { - return Uni.createFrom().item("ASDASD"); - } - private static final Response createResponse() { Response response = new Response(); response.setId("identifier"); diff --git a/http/reactive-routes/src/test/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandlerIT.java b/http/reactive-routes/src/test/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandlerIT.java index d04aca380..a09e6c99a 100644 --- a/http/reactive-routes/src/test/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandlerIT.java +++ b/http/reactive-routes/src/test/java/io/quarkus/ts/http/reactiveroutes/validation/ValidationOnResponseRouteHandlerIT.java @@ -7,7 +7,6 @@ import static io.restassured.RestAssured.given; import org.apache.http.HttpStatus; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import io.quarkus.test.scenarios.QuarkusScenario; @@ -39,18 +38,4 @@ public void shouldGetValidationErrorWhenUniResponseIdIsWrong() { assertValidationErrorField(response, "id", "id can't be null"); } - @Disabled("Not validating Java types. Reported in: https://github.com/quarkusio/quarkus/issues/15168") - @Test - public void shouldGetValidationErrorWhenUniResponseStringIsWrong() { - ValidationErrorResponse response = given() - .when() - .get("/validate/response-uni-invalid-string") - .then() - .statusCode(HttpStatus.SC_INTERNAL_SERVER_ERROR) - .extract().as(ValidationErrorResponse.class); - - assertValidationErrorTitle(response); - assertValidationErrorDetails(response); - assertValidationErrorStatus(response, HttpStatus.SC_INTERNAL_SERVER_ERROR); - } } diff --git a/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/LargeFileHandlingIT.java b/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/LargeFileHandlingIT.java index 28f5a80f7..213f7a75e 100644 --- a/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/LargeFileHandlingIT.java +++ b/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/LargeFileHandlingIT.java @@ -23,9 +23,9 @@ import io.quarkus.test.bootstrap.RestService; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnNative; import io.quarkus.test.services.QuarkusApplication; import io.quarkus.ts.http.restclient.reactive.files.OsUtils; +import io.restassured.http.ContentType; import io.restassured.response.Response; @QuarkusScenario @@ -58,7 +58,7 @@ public LargeFileHandlingIT() { } @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void validateClientResponse() { Response original = app.given().get("/file/hash"); Response wrapped = app.given().get("/file-client/hash"); @@ -83,7 +83,7 @@ public void downloadDirectly() throws IOException { } @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void downloadThroughClient() { Response hashSum = app.given().get("/file/hash"); assertEquals(HttpStatus.SC_OK, hashSum.statusCode()); @@ -97,8 +97,7 @@ public void downloadThroughClient() { } @Test - @Disabled("https://github.com/quarkusio/quarkus/issues/24415") - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void downloadMultipart() { Response hashSum = app.given().get("/file/hash"); assertEquals(HttpStatus.SC_OK, hashSum.statusCode()); @@ -112,7 +111,6 @@ public void downloadMultipart() { } @Test - @Disabled("https://github.com/rest-assured/rest-assured/issues/1480") public void uploadInputStream() throws IOException { utils.createFile(uploaded, BIGGER_THAN_TWO_GIGABYTES); String hashsum = utils.getSum(uploaded); @@ -120,6 +118,7 @@ public void uploadInputStream() throws IOException { try (InputStream stream = new FileInputStream(uploaded.toFile())) { Response response = app.given() .body(stream) + .contentType(ContentType.BINARY) .post("/file/upload/"); assertEquals(HttpStatus.SC_OK, response.statusCode()); assertEquals(hashsum, response.body().asString()); @@ -140,8 +139,7 @@ public void uploadFile() { } @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") - @DisabledOnNative(reason = "https://github.com/quarkusio/quarkus/issues/25973") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void uploadFileThroughClient() { Response hashSum = app.given().get("/file-client/client-hash"); assertEquals(HttpStatus.SC_OK, hashSum.statusCode()); @@ -155,8 +153,7 @@ public void uploadFileThroughClient() { } @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") - @Disabled("https://github.com/quarkusio/quarkus/issues/26187") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void uploadMultipart() { Response hashSum = app.given().get("/file-client/client-hash"); assertEquals(HttpStatus.SC_OK, hashSum.statusCode()); @@ -170,7 +167,7 @@ public void uploadMultipart() { } @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void failOnMalformedMultipart() { Response download = app.given().get("/file-client/download-broken-multipart"); assertEquals(HttpStatus.SC_INTERNAL_SERVER_ERROR, download.statusCode()); diff --git a/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ReactiveRestClientIT.java b/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ReactiveRestClientIT.java index 9bfb98099..357449643 100644 --- a/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ReactiveRestClientIT.java +++ b/http/rest-client-reactive/src/test/java/io/quarkus/ts/http/restclient/reactive/ReactiveRestClientIT.java @@ -29,7 +29,7 @@ public class ReactiveRestClientIT { static RestService app = new RestService().withProperties("modern.properties"); @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void shouldGetBookFromRestClientJson() { Response response = app.given().with().pathParam("id", "123") .get("/client/book/{id}/json"); @@ -39,7 +39,7 @@ public void shouldGetBookFromRestClientJson() { @Tag("QUARKUS-1568") @Test - @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkusio/quarkus/issues/24763") + @DisabledOnOs(value = OS.WINDOWS, disabledReason = "https://github.com/quarkus-qe/quarkus-test-framework/issues/584") public void supportPathParamFromBeanParam() { Response response = app.given().with().pathParam("id", "123") .get("/client/book/{id}/jsonByBeanParam"); diff --git a/infinispan-client/src/test/java/io/quarkus/ts/infinispan/client/OperatorOpenShiftInfinispanObjectsIT.java b/infinispan-client/src/test/java/io/quarkus/ts/infinispan/client/OperatorOpenShiftInfinispanObjectsIT.java index fefe6dabd..849c2d301 100644 --- a/infinispan-client/src/test/java/io/quarkus/ts/infinispan/client/OperatorOpenShiftInfinispanObjectsIT.java +++ b/infinispan-client/src/test/java/io/quarkus/ts/infinispan/client/OperatorOpenShiftInfinispanObjectsIT.java @@ -93,12 +93,9 @@ public void testQueryOnSerializedObjects() { thenCacheBodyMust(not(containsString("MECHANICAL"))); } - /** - * TODO JIRA ISPN issue: https://issues.redhat.com/browse/ISPN-13292 - */ @Test @Order(4) - @Disabled + @Disabled("https://issues.redhat.com/browse/ISPN-13292") public void testCacheEvictionByLifespanAndIdleTime() { whenAddCacheItemsWithLifespanAndIdleTime(maxThresholdItemList, CACHE_LIFESPAN_SEC + 20, CACHE_IDLE_TIME_SEC); await().pollDelay(Duration.ofSeconds(15)).atMost(Duration.ofSeconds(20)).untilAsserted(() -> { diff --git a/messaging/kafka-streams-reactive-messaging/src/test/java/io/quarkus/ts/messaging/kafka/reactive/streams/DevModeKafkaStreamIT.java b/messaging/kafka-streams-reactive-messaging/src/test/java/io/quarkus/ts/messaging/kafka/reactive/streams/DevModeKafkaStreamIT.java index 490395ee8..5c6b9a7fd 100644 --- a/messaging/kafka-streams-reactive-messaging/src/test/java/io/quarkus/ts/messaging/kafka/reactive/streams/DevModeKafkaStreamIT.java +++ b/messaging/kafka-streams-reactive-messaging/src/test/java/io/quarkus/ts/messaging/kafka/reactive/streams/DevModeKafkaStreamIT.java @@ -1,6 +1,5 @@ package io.quarkus.ts.messaging.kafka.reactive.streams; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; @@ -11,8 +10,6 @@ @Tag("QUARKUS-1026") @Tag("QUARKUS-959") @QuarkusScenario -//TODO https://github.com/quarkusio/quarkus/issues/27352 -@Disabled public class DevModeKafkaStreamIT extends BaseKafkaStreamTest { /** @@ -24,7 +21,7 @@ public class DevModeKafkaStreamIT extends BaseKafkaStreamTest { @Override protected String getAppUrl() { - return app.getHost() + ":" + app.getPort(); + return app.getURI().withScheme("http").toString(); } @Test diff --git a/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/OpenShiftMicroProfileIT.java b/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/OpenShiftMicroProfileIT.java index 95870c7e1..37316f910 100644 --- a/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/OpenShiftMicroProfileIT.java +++ b/monitoring/microprofile-opentracing/src/test/java/io/quarkus/ts/microprofile/opentracing/OpenShiftMicroProfileIT.java @@ -1,10 +1,8 @@ package io.quarkus.ts.microprofile.opentracing; import io.quarkus.test.scenarios.OpenShiftScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; @OpenShiftScenario -@DisabledOnQuarkusVersion(version = "1\\.3\\..*", reason = "https://github.com/quarkusio/quarkus/pull/7987") public class OpenShiftMicroProfileIT extends MicroProfileIT { private static final int QUARKUS_INTERNAL_HTTP_PORT = 8080; diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCompletionIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCompletionIT.java index 365e5b28f..961748320 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCompletionIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCompletionIT.java @@ -10,12 +10,10 @@ import io.quarkus.test.bootstrap.QuarkusCliClient; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; @Tag("QUARKUS-960") @Tag("quarkus-cli") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") public class QuarkusCliCompletionIT { diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateJvmApplicationIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateJvmApplicationIT.java index 4a55b2df0..5a951b533 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateJvmApplicationIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateJvmApplicationIT.java @@ -29,7 +29,6 @@ import org.apache.maven.model.io.xpp3.MavenXpp3Reader; import org.codehaus.plexus.util.xml.pull.XmlPullParserException; import org.junit.jupiter.api.Assertions; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import org.junit.jupiter.api.Test; import org.junit.jupiter.api.condition.DisabledIfSystemProperty; @@ -37,13 +36,11 @@ import io.quarkus.test.bootstrap.QuarkusCliClient; import io.quarkus.test.bootstrap.QuarkusCliRestService; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; import io.quarkus.test.services.quarkus.model.QuarkusProperties; @Tag("QUARKUS-960") @Tag("quarkus-cli") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") public class QuarkusCliCreateJvmApplicationIT { @@ -113,7 +110,6 @@ public void quarkusCreatedWithJava18ShouldUseJava17() { @Tag("QUARKUS-1071") @Test - @DisabledOnQuarkusVersion(version = ".*redhat.*", reason = "Do not run on productized bits - https://issues.redhat.com/browse/QUARKUS-1740") public void shouldCreateApplicationWithGradleOnJvm() { // Create application @@ -129,8 +125,6 @@ public void shouldCreateApplicationWithGradleOnJvm() { } @Tag("QUARKUS-1071") - // TODO https://github.com/quarkusio/quarkus/issues/22964 - @Disabled("There is an issue related to Jbang and maven local repository on github actions") @Test public void shouldCreateApplicationWithJbangOnJvm() { diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateNativeApplicationIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateNativeApplicationIT.java index 30b735126..f4af7b687 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateNativeApplicationIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliCreateNativeApplicationIT.java @@ -12,12 +12,10 @@ import io.quarkus.test.bootstrap.QuarkusCliClient; import io.quarkus.test.bootstrap.QuarkusCliRestService; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; @Tag("QUARKUS-960") @Tag("quarkus-cli") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @EnabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for Native verification") public class QuarkusCliCreateNativeApplicationIT { diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java index ec2fd6363..5f2fd0435 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliExtensionsIT.java @@ -28,7 +28,6 @@ @Tag("QUARKUS-960") @Tag("quarkus-cli") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") public class QuarkusCliExtensionsIT { diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliHelpIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliHelpIT.java index c25df35e5..6c7971458 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliHelpIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliHelpIT.java @@ -10,12 +10,10 @@ import io.quarkus.test.bootstrap.QuarkusCliClient; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; @Tag("QUARKUS-960") @Tag("quarkus-cli") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") public class QuarkusCliHelpIT { diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliSpecialCharsIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliSpecialCharsIT.java index a7062bf2a..babc373ab 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliSpecialCharsIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliSpecialCharsIT.java @@ -18,13 +18,11 @@ import io.quarkus.test.bootstrap.QuarkusCliClient; import io.quarkus.test.scenarios.QuarkusScenario; -import io.quarkus.test.scenarios.annotations.DisabledOnQuarkusVersion; import io.quarkus.test.utils.FileUtils; @Tag("QUARKUS-960") @Tag("quarkus-cli") @QuarkusScenario -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") public class QuarkusCliSpecialCharsIT { diff --git a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliVersionIT.java b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliVersionIT.java index 144c5ce9a..4ff24672b 100644 --- a/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliVersionIT.java +++ b/quarkus-cli/src/test/java/io/quarkus/ts/quarkus/cli/QuarkusCliVersionIT.java @@ -18,7 +18,6 @@ @Tag("quarkus-cli") @QuarkusScenario @Disabled("Move to Quarkus 2.7 instead of Quarkus main") -@DisabledOnQuarkusVersion(version = "1\\..*", reason = "Quarkus CLI has been reworked in 2.x") @DisabledOnQuarkusVersion(version = ".*redhat.*", reason = "Do not run CLI version check on productized bits") @DisabledIfSystemProperty(named = "profile.id", matches = "native", disabledReason = "Only for JVM verification") public class QuarkusCliVersionIT { diff --git a/qute/reactive/src/main/resources/templates/maps.html b/qute/reactive/src/main/resources/templates/maps.html index c597d533f..41d852913 100644 --- a/qute/reactive/src/main/resources/templates/maps.html +++ b/qute/reactive/src/main/resources/templates/maps.html @@ -1,11 +1,10 @@ {#if !map.isEmpty} The capital of Tasmania is {map.Tasmania}, {map.['Java']} is a capital of Java and {map.get('The Great Britain')} is a capital of the UK. -{/if} -
+Yes, you're right, it's {map['The Great Britain']}! +
+{/if} {#for country in map.keySet} {country_count}. {country}
{/for} diff --git a/qute/reactive/src/test/java/io/quarkus/ts/qute/QuteReactiveIT.java b/qute/reactive/src/test/java/io/quarkus/ts/qute/QuteReactiveIT.java index cab782fcf..188de3c35 100644 --- a/qute/reactive/src/test/java/io/quarkus/ts/qute/QuteReactiveIT.java +++ b/qute/reactive/src/test/java/io/quarkus/ts/qute/QuteReactiveIT.java @@ -182,15 +182,16 @@ void maps() { final String[] content = response.body().asString().split("\n"); assertEquals("The capital of Tasmania is Hobart, Jakarta is a capital of Java and London is a capital of the UK.", content[1].stripLeading()); - int keysLine = 6; + assertEquals("Yes, you're right, it's London!", content[3].stripLeading()); + int keysLine = 5; assertEquals("1. Java
", content[keysLine].stripLeading()); assertEquals("2. Tasmania
", content[keysLine + 1].stripLeading()); assertEquals("3. The Great Britain
", content[keysLine + 2].stripLeading()); - assertEquals("I am a Java programmer and there are 3 cities I know:
", content[9].stripLeading()); - int valuesLine = 10; - assertEquals("0. Jakarta
", content[valuesLine].stripLeading()); - assertEquals("1. Hobart
", content[valuesLine + 1].stripLeading()); - assertEquals("2. London
", content[valuesLine + 2].stripLeading()); + int valuesLine = 8; + assertEquals("I am a Java programmer and there are 3 cities I know:
", content[valuesLine].stripLeading()); + assertEquals("0. Jakarta
", content[valuesLine + 1].stripLeading()); + assertEquals("1. Hobart
", content[valuesLine + 2].stripLeading()); + assertEquals("2. London
", content[valuesLine + 3].stripLeading()); } @Test @@ -198,7 +199,7 @@ void emptyMaps() { Response response = app.given().get("/map?name=europe"); assertEquals(200, response.statusCode()); final String[] content = response.body().asString().split("\n"); - assertEquals("I am a Java programmer and there are zero cities I know:
", content[5].stripLeading()); + assertEquals("I am a Java programmer and there are zero cities I know:
", content[1].stripLeading()); } @Test diff --git a/qute/synchronous/src/main/resources/templates/maps.html b/qute/synchronous/src/main/resources/templates/maps.html index c597d533f..6c128225f 100644 --- a/qute/synchronous/src/main/resources/templates/maps.html +++ b/qute/synchronous/src/main/resources/templates/maps.html @@ -1,16 +1,15 @@ {#if !map.isEmpty} The capital of Tasmania is {map.Tasmania}, {map.['Java']} is a capital of Java and {map.get('The Great Britain')} is a capital of the UK. -{/if} -
+Yes, you're right, it's {map['The Great Britain']}! +
+{/if} {#for country in map.keySet} - {country_count}. {country}
+{country_count}. {country}
{/for} I am a Java programmer and there are {#if map.isEmpty}zero{#else}{map.size}{/if} cities I know:
{#for capital in map.values} - {capital_index}. {capital}
+{capital_index}. {capital}
{/for} diff --git a/qute/synchronous/src/test/java/io/quarkus/ts/qute/QuteIT.java b/qute/synchronous/src/test/java/io/quarkus/ts/qute/QuteIT.java index c92aea3dd..bf9039dbf 100644 --- a/qute/synchronous/src/test/java/io/quarkus/ts/qute/QuteIT.java +++ b/qute/synchronous/src/test/java/io/quarkus/ts/qute/QuteIT.java @@ -182,15 +182,16 @@ void maps() { final String[] content = response.body().asString().split("\n"); assertEquals("The capital of Tasmania is Hobart, Jakarta is a capital of Java and London is a capital of the UK.", content[1].stripLeading()); - int keysLine = 6; + assertEquals("Yes, you're right, it's London!", content[3].stripLeading()); + int keysLine = 5; assertEquals("1. Java
", content[keysLine].stripLeading()); assertEquals("2. Tasmania
", content[keysLine + 1].stripLeading()); assertEquals("3. The Great Britain
", content[keysLine + 2].stripLeading()); - assertEquals("I am a Java programmer and there are 3 cities I know:
", content[9].stripLeading()); - int valuesLine = 10; - assertEquals("0. Jakarta
", content[valuesLine].stripLeading()); - assertEquals("1. Hobart
", content[valuesLine + 1].stripLeading()); - assertEquals("2. London
", content[valuesLine + 2].stripLeading()); + int valuesLine = 8; + assertEquals("I am a Java programmer and there are 3 cities I know:
", content[valuesLine].stripLeading()); + assertEquals("0. Jakarta
", content[valuesLine + 1].stripLeading()); + assertEquals("1. Hobart
", content[valuesLine + 2].stripLeading()); + assertEquals("2. London
", content[valuesLine + 3].stripLeading()); } @Test @@ -198,7 +199,7 @@ void emptyMaps() { Response response = app.given().get("/map?name=europe"); assertEquals(200, response.statusCode()); final String[] content = response.body().asString().split("\n"); - assertEquals("I am a Java programmer and there are zero cities I know:
", content[5].stripLeading()); + assertEquals("I am a Java programmer and there are zero cities I know:
", content[1].stripLeading()); } @Test diff --git a/sql-db/hibernate-fulltext-search/src/test/java/io/quarkus/ts/hibernate/search/OpenShiftMysqlMultitenantHibernateSearchIT.java b/sql-db/hibernate-fulltext-search/src/test/java/io/quarkus/ts/hibernate/search/OpenShiftMysqlMultitenantHibernateSearchIT.java index 52a5cc44e..cb7446b4c 100644 --- a/sql-db/hibernate-fulltext-search/src/test/java/io/quarkus/ts/hibernate/search/OpenShiftMysqlMultitenantHibernateSearchIT.java +++ b/sql-db/hibernate-fulltext-search/src/test/java/io/quarkus/ts/hibernate/search/OpenShiftMysqlMultitenantHibernateSearchIT.java @@ -12,8 +12,7 @@ @OpenShiftScenario @EnabledIfSystemProperty(named = "ts.redhat.registry.enabled", matches = "true") -@Disabled -//TODO https://github.com/quarkus-qe/quarkus-test-framework/issues/427 +@Disabled("https://github.com/quarkus-qe/quarkus-test-framework/issues/427") public class OpenShiftMysqlMultitenantHibernateSearchIT extends AbstractMultitenantHibernateSearchIT { static final int ELASTIC_PORT = 9200; static final int MYSQL_PORT = 3306; diff --git a/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MariaDbDatabaseHibernateReactiveIT.java b/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MariaDbDatabaseHibernateReactiveIT.java index 146b2ef48..2366e7e9d 100644 --- a/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MariaDbDatabaseHibernateReactiveIT.java +++ b/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MariaDbDatabaseHibernateReactiveIT.java @@ -1,9 +1,8 @@ package io.quarkus.ts.hibernate.reactive; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.condition.EnabledIfSystemProperty; -import io.quarkus.test.bootstrap.DefaultService; +import io.quarkus.test.bootstrap.MariaDbService; import io.quarkus.test.bootstrap.RestService; import io.quarkus.test.scenarios.QuarkusScenario; import io.quarkus.test.services.Container; @@ -18,36 +17,23 @@ public class MariaDbDatabaseHibernateReactiveIT extends AbstractDatabaseHibernat private static final String MYSQL_DATABASE = "quarkus_test"; private static final int MYSQL_PORT = 3306; - // TODO At the time of writing, there is no specific connector for mariadb, so we are using MY SQL driver and service. - // we need to change this, if this connector will be ever provided Additionally, we need to add an OpenShift test + // TODO At the time of writing, there is no specific connector for mariadb, so we are using MY SQL driver. + // we need to change this, if this connector will be ever provided. Additionally, we need to add an OpenShift test @Container(image = "${mariadb.105.image}", port = MYSQL_PORT, expectedLog = "Only MySQL server logs after this point") - static DefaultService database = new DefaultService() - .withProperty("MYSQL_USER", MYSQL_USER) - .withProperty("MYSQL_PASSWORD", MYSQL_PASSWORD) - .withProperty("MYSQL_DATABASE", MYSQL_DATABASE); + static MariaDbService database = new MariaDbService() + .withUser(MYSQL_USER) + .withPassword(MYSQL_PASSWORD) + .withDatabase(MYSQL_DATABASE); @QuarkusApplication static RestService app = new RestService().withProperties("mysql.properties") .withProperty("quarkus.datasource.username", MYSQL_USER) .withProperty("quarkus.datasource.password", MYSQL_PASSWORD) .withProperty("quarkus.datasource.reactive.url", - () -> "vertx-reactive:" + database.getHost().replace("http", "mysql") + ":" + database.getPort() + "/" - + MYSQL_DATABASE); + () -> database.getReactiveUrl().replace("mariadb", "mysql")); @Override protected RestService getApp() { return app; } - - @Override - @Disabled // due to https://github.com/quarkusio/quarkus/issues/22254 - public void convertValue() { - - } - - @Override - @Disabled // due to https://github.com/quarkusio/quarkus/issues/22254 - public void setConvertedValue() { - - } } diff --git a/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MsSQLDatabaseHibernateReactiveIT.java b/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MsSQLDatabaseHibernateReactiveIT.java index c9d55af15..ebef9f0de 100644 --- a/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MsSQLDatabaseHibernateReactiveIT.java +++ b/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MsSQLDatabaseHibernateReactiveIT.java @@ -1,8 +1,5 @@ package io.quarkus.ts.hibernate.reactive; -import org.junit.jupiter.api.Disabled; -import org.junit.jupiter.api.Test; - import io.quarkus.test.bootstrap.RestService; import io.quarkus.test.bootstrap.SqlServerService; import io.quarkus.test.scenarios.QuarkusScenario; @@ -10,7 +7,6 @@ import io.quarkus.test.services.QuarkusApplication; @QuarkusScenario -//TODO: enable disabled methods then the issue will be fixed public class MsSQLDatabaseHibernateReactiveIT extends AbstractDatabaseHibernateReactiveIT { private static final int MSSQL_PORT = 1433; @@ -29,17 +25,4 @@ protected RestService getApp() { return app; } - @Test - @Override - @Disabled("https://github.com/quarkusio/quarkus/issues/19539") - public void connectToUniEndpoint() { - // MSSQL hibernate has some problems with extended Latin - } - - @Test - @Override - @Disabled("https://github.com/quarkusio/quarkus/issues/19539") - public void connectToMultiEndpoint() { - // MSSQL hibernate has some problems with extended Latin - } } diff --git a/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MySQLDatabaseHibernateReactiveIT.java b/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MySQLDatabaseHibernateReactiveIT.java index 52e392092..83ad59c4d 100644 --- a/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MySQLDatabaseHibernateReactiveIT.java +++ b/sql-db/hibernate-reactive/src/test/java/io/quarkus/ts/hibernate/reactive/MySQLDatabaseHibernateReactiveIT.java @@ -1,6 +1,5 @@ package io.quarkus.ts.hibernate.reactive; -import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Tag; import io.quarkus.test.bootstrap.MySqlService; @@ -35,16 +34,4 @@ public class MySQLDatabaseHibernateReactiveIT extends AbstractDatabaseHibernateR protected RestService getApp() { return app; } - - @Override - @Disabled // due to https://github.com/quarkusio/quarkus/issues/22254 - public void convertValue() { - - } - - @Override - @Disabled // due to https://github.com/quarkusio/quarkus/issues/22254 - public void setConvertedValue() { - - } } diff --git a/sql-db/hibernate-reactive/src/test/resources/mysql_import.sql b/sql-db/hibernate-reactive/src/test/resources/mysql_import.sql index 91fddae92..787fc787b 100644 --- a/sql-db/hibernate-reactive/src/test/resources/mysql_import.sql +++ b/sql-db/hibernate-reactive/src/test/resources/mysql_import.sql @@ -1,5 +1,5 @@ DROP TABLE IF EXISTS authors; -CREATE TABLE authors (id INT NOT NULL AUTO_INCREMENT,name TEXT NOT NULL,PRIMARY KEY(id)); +CREATE TABLE authors (id INT NOT NULL AUTO_INCREMENT, name VARCHAR(31) NOT NULL, PRIMARY KEY(id)); INSERT INTO authors(id,name) VALUES (1, 'Homer'); INSERT INTO authors(id,name) VALUES (2, 'Vern'); INSERT INTO authors(id,name) VALUES (3, 'Dlugi'); @@ -8,8 +8,8 @@ DROP TABLE IF EXISTS books; CREATE TABLE books ( id INT NOT NULL AUTO_INCREMENT, author INT, - title TEXT NOT NULL, - isbn TEXT, + title VARCHAR(63) NOT NULL, + isbn VARCHAR(63), PRIMARY KEY(id), FOREIGN KEY (author) REFERENCES authors(id) ON DELETE CASCADE ON UPDATE RESTRICT); INSERT INTO books(author, title) VALUES (3, 'SlovnĂ­k');