Skip to content

Commit

Permalink
Merge pull request #23163 from geoand/#23148
Browse files Browse the repository at this point in the history
Fix kotlin serialization native test failure
  • Loading branch information
geoand authored Jan 25, 2022
2 parents d44c123 + cee1cf1 commit fedc069
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/native-tests.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down Expand Up @@ -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")
Expand All @@ -66,7 +62,7 @@ class CountriesResource {

rc.response()
.putHeader("content-type", "application/json")
.end(json.encodeToString(body))
.end(json.encodeToString("[$body[0]]"))
}
}
}
}

0 comments on commit fedc069

Please sign in to comment.