k3po / k3po

"I am fluent in over 6 million forms of communication!"
Apache License 2.0
48 stars 34 forks source link

Can't get client hard close to work with http after websocket upgrade #223

Closed cmebarrow closed 8 years ago

cmebarrow commented 8 years ago

There are several test scenarios where client needs to close the underlying tcp connection after websocket upgrade without doing a websocket close handshake. This is mandated by RFC 6455 for cases like invalid websocket handshake response or unrecognized extensions in websocket handshake response. I have not been able to find a way to make scripts work in this case. Client "close closed" and server "closed" does not work, test fails with actual having no "close closed" or "closed". Test case (added to HttpIT.java in driver project) is:


    @Test
    @TestSpecification({
        "http.accept.websocket.handshake.then.client.hard.close",
        "http.connect.websocket.handshake.then.client.hard.close" })
    public void shouldAcceptWebsocketHandshakeThenClientHardClose() throws Exception {
        k3po.finish();
    }

with scripts:

http.accept.websocket.handshake.then.client.hard.close.rpt | uploaded via ZenHub

http.connect.websocket.handshake.then.client.hard.close.rpt | uploaded via ZenHub

jfallows commented 8 years ago

This sounds like a race condition previously discussed with @dpwspoon that I thought we had already resolved. Perhaps that bug is either different, the fix is not yet merged / released, or the test case is using an older release of k3po.

cmebarrow commented 8 years ago

The test case is using latest (develop branch) of k3po.

jfallows commented 8 years ago

Recommend also trying write close instead of close and read closed instead of closed.

cmebarrow commented 8 years ago

I tried that but it does not help.

cmebarrow commented 8 years ago

Fixed, pull request #243