Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kotlin serialization native test failure #23163

Merged
merged 2 commits into from
Jan 25, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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]]"))
}
}
}
}