From 022e9cc98d8cd13b5739bbcd41f35eb155683ee7 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 25 Jan 2022 08:49:23 +0200 Subject: [PATCH 1/2] Fix kotlin serialization native test failure Also apply some minor polish Fixes: #23148 --- .../kotlin/io/quarkus/it/rest/CountriesResource.kt | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/integration-tests/rest-client-reactive-kotlin-serialization/src/main/kotlin/io/quarkus/it/rest/CountriesResource.kt b/integration-tests/rest-client-reactive-kotlin-serialization/src/main/kotlin/io/quarkus/it/rest/CountriesResource.kt index cc1f5559d7fb9..b2166e7591807 100644 --- a/integration-tests/rest-client-reactive-kotlin-serialization/src/main/kotlin/io/quarkus/it/rest/CountriesResource.kt +++ b/integration-tests/rest-client-reactive-kotlin-serialization/src/main/kotlin/io/quarkus/it/rest/CountriesResource.kt @@ -10,14 +10,11 @@ import org.eclipse.microprofile.rest.client.RestClientBuilder import java.net.URI import javax.enterprise.context.ApplicationScoped import javax.enterprise.event.Observes -import javax.inject.Inject import javax.ws.rs.Path @Path("/") @ApplicationScoped -class CountriesResource { - @Inject - lateinit var json: Json +class CountriesResource(private val json: Json) { fun init(@Observes router: Router) { router.post().handler(BodyHandler.create()) @@ -50,7 +47,6 @@ class CountriesResource { val client = RestClientBuilder.newBuilder() .baseUri(URI.create(rc.body.toString())) .build(CountriesClient::class.java) - val result = client.countries() rc.response() .setStatusCode(200) .end("OK") @@ -66,7 +62,7 @@ class CountriesResource { rc.response() .putHeader("content-type", "application/json") - .end(json.encodeToString(body)) + .end(json.encodeToString("[$body[0]]")) } } -} \ No newline at end of file +} From cee1cf12dbcac4daf8ea091648b3504094552df7 Mon Sep 17 00:00:00 2001 From: Georgios Andrianakis Date: Tue, 25 Jan 2022 08:50:22 +0200 Subject: [PATCH 2/2] Add rest-client-reactive-kotlin-serialization module to native test configuration --- .github/native-tests.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/native-tests.json b/.github/native-tests.json index cbe5c7c3c3456..fe8b792a74c44 100644 --- a/.github/native-tests.json +++ b/.github/native-tests.json @@ -99,7 +99,7 @@ { "category": "Misc1", "timeout": 65, - "test-modules": "maven, jackson, jsonb, kotlin-serialization, quartz, qute, logging-min-level-unset, logging-min-level-set, simple with space", + "test-modules": "maven, jackson, jsonb, kotlin-serialization, rest-client-reactive-kotlin-serialization, quartz, qute, logging-min-level-unset, logging-min-level-set, simple with space", "os-name": "ubuntu-latest" }, {