This is interesting. One of my ktor tests is hangi...
# ktor
a
This is interesting. One of my ktor tests is hanging indefinitely. If I pause in the debugger I can see that it’s hung trying to write some bytes to the output stream. This just started happening and I’m unsure why. At first I thought it was because nobody was consuming the response body but that isn’t the case I think. The test uses the test application which I believe reads the entire body. This is the test in question:
Copy code
withTestApplication({ module(config) }) {
    assertEquals(
        HttpStatusCode.Unauthorized,
        handleWebSocket("/some/path") {
            addHeader(HttpHeaders.Authorization, "Bearer invalid")
        }.response.status()
    )
}
This only seems to happen if the response body is somewhat large. Presumably this is because some buffer runs out of space. The question is why my test doesn’t resume with a response. Before this happens
This seems to only happen for web socket routes
a