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

Nima handler silently responds 200 when finished without actual send #5779

Closed
danielkec opened this issue Jan 4, 2023 · 0 comments
Closed
Assignees
Labels
Níma Helidon Níma P3

Comments

@danielkec
Copy link
Contributor

@org.junit.jupiter.api.Test
    void name() throws InterruptedException {
        WebServer server = WebServer.builder()
                .routing(it -> it.get("/recovery", (req, res) ->
//                                res.status(Http.Status.ACCEPTED_202).send("test")
                        Executors.newSingleThreadExecutor().submit(() -> res.status(Http.Status.ACCEPTED_202).send("test"))
                ))
                .build()
                .start();

        var res = WebClient.builder()
                .baseUri("http://localhost/:" + server.port())
                .build()
                .get()
                .path("/recovery")
                .request()
                .await();
        server.stop();

        Assertions.assertEquals(202, res.status().code());
        Assertions.assertEquals("test", res.content().as(String.class).await());
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Níma Helidon Níma P3
Projects
Archived in project
Development

No branches or pull requests

3 participants