MrJoes/sockjs-tornado — Issue #6: SockJS 0.2? Or 0.1 full compliance?
Author: 23doors
Created: 2012-01-20 04:44:01+00:00
State: open

With SockJS 0.2 release, will sockjs-tornado support it any time soon?

I found that you didnt include any examples for testing sockjs protocol.
I created my own script using sockjs and well, test is failing in some cases. It would be great to see it all green ;)

# 0.1 full results

test_greeting (__main__.BaseUrlGreeting) ... ok
test_notFound (__main__.BaseUrlGreeting) ... ok
test_basic (__main__.ChunkingTest) ... ok
test_options (__main__.ChunkingTest) ... ok
test_transport (__main__.EventSource) ... ok
test_no_callback (__main__.HtmlFile) ... ok
test_transport (__main__.HtmlFile) ... ok
test_cacheability (__main__.IframePage) ... ok
test_invalidUrl (__main__.IframePage) ... ok
test_queriedUrl (__main__.IframePage) ... ok
test_simpleUrl (__main__.IframePage) ... ok
test_versionedUrl (__main__.IframePage) ... ok
test_content_types (__main__.JsonPolling) ... ok
test_invalid_json (__main__.JsonPolling) ... ok
test_no_callback (__main__.JsonPolling) ... ok
test_transport (__main__.JsonPolling) ... FAIL
test_closeSession (__main__.Protocol) ... ERROR
test_simpleSession (__main__.Protocol) ... ok
test_closeSession_another_connection (__main__.ProtocolQuirks) ... HANGS UP
test_anyValue (__main__.SessionURLs) ... ok
test_ignoringServerId (__main__.SessionURLs)
See Protocol.test_simpleSession for explanation. ... ok
test_invalidPaths (__main__.SessionURLs) ... ok
test_broken_json (__main__.WebsocketHixie76) ... ERROR
test_close (__main__.WebsocketHixie76) ... FAIL
test_empty_frame (__main__.WebsocketHixie76) ... ok
test_headersSanity (__main__.WebsocketHixie76) ... ok
test_reuseSessionId (__main__.WebsocketHixie76) ... ok
test_transport (__main__.WebsocketHixie76) ... ok
test_disabledTransport (__main__.WebsocketHttpErrors) ... ok
test_httpMethod (__main__.WebsocketHttpErrors) ... ok
test_invalidConnectionHeader (__main__.WebsocketHttpErrors) ... ok
test_invalidMethod (__main__.WebsocketHttpErrors) ... ok
test_verifyOrigin (__main__.WebsocketHttpErrors) ... ok
test_broken_json (__main__.WebsocketHybi10) ... ok
test_close (__main__.WebsocketHybi10) ... ERROR
test_firefox_602_connection_header (__main__.WebsocketHybi10) ... ok
test_headersSanity (__main__.WebsocketHybi10) ... ok
test_transport (__main__.WebsocketHybi10) ... ok
test_content_types (__main__.XhrPolling) ... ok
test_invalid_json (__main__.XhrPolling) ... ok
test_invalid_session (__main__.XhrPolling) ... ok
test_jsessionid (__main__.XhrPolling) ... ok
test_options (__main__.XhrPolling) ... ok
test_transport (__main__.XhrPolling) ... FAIL
test_options (__main__.XhrStreaming) ... ok
test_transport (__main__.XhrStreaming) ... ok

# Now 0.2

test_greeting (__main__.BaseUrlGreeting) ... ok
test_notFound (__main__.BaseUrlGreeting) ... ok
test_response_limit (__main__.EventSource) ... ok
test_transport (__main__.EventSource) ... ok
test_abort_xhr_polling (__main__.HandlingClose) ... ERROR
test_abort_xhr_streaming (__main__.HandlingClose) ... HANGS UP
test_close_frame (__main__.HandlingClose) ... HANGS UP
test_close_request (__main__.HandlingClose) ... ok
test_no_callback (__main__.HtmlFile) ... ok
test_response_limit (__main__.HtmlFile) ... ok
test_transport (__main__.HtmlFile) ... ok
test_cacheability (__main__.IframePage) ... ok
test_invalidUrl (__main__.IframePage) ... ok
test_queriedUrl (__main__.IframePage) ... ok
test_simpleUrl (__main__.IframePage) ... ok
test_versionedUrl (__main__.IframePage) ... ok
test_basic (__main__.InfoTest) ... FAIL
test_disabled_websocket (__main__.InfoTest) ... FAIL
test_entropy (__main__.InfoTest) ... ERROR
test_options (__main__.InfoTest) ... FAIL
test_xhr_server_decodes (__main__.JSONEncoding) ... ok
test_xhr_server_encodes (__main__.JSONEncoding) ... ok
test_content_types (__main__.JsonPolling) ... ok
test_invalid_json (__main__.JsonPolling) ... ok
test_no_callback (__main__.JsonPolling) ... ok
test_transport (__main__.JsonPolling) ... ok
test_closeSession (__main__.Protocol) ... ERROR
test_simpleSession (__main__.Protocol) ... ok
test_close (__main__.RawWebsocket) ... ERROR
test_transport (__main__.RawWebsocket) ... ERROR
test_anyValue (__main__.SessionURLs) ... ok
test_ignoringServerId (__main__.SessionURLs)
See Protocol.test_simpleSession for explanation. ... ok
test_invalidPaths (__main__.SessionURLs) ... ok
test_broken_json (__main__.WebsocketHixie76) ... ERROR
test_close (__main__.WebsocketHixie76) ... FAIL
test_empty_frame (__main__.WebsocketHixie76) ... ok
test_headersSanity (__main__.WebsocketHixie76) ... ok
test_reuseSessionId (__main__.WebsocketHixie76) ... ok
test_transport (__main__.WebsocketHixie76) ... ok
test_httpMethod (__main__.WebsocketHttpErrors) ... ok
test_invalidConnectionHeader (__main__.WebsocketHttpErrors) ... ok
test_invalidMethod (__main__.WebsocketHttpErrors) ... FAIL
test_verifyOrigin (__main__.WebsocketHttpErrors) ... ok
test_broken_json (__main__.WebsocketHybi10) ... ok
test_close (__main__.WebsocketHybi10) ... ERROR
test_firefox_602_connection_header (__main__.WebsocketHybi10) ... ok
test_headersSanity (__main__.WebsocketHybi10) ... ok
test_transport (__main__.WebsocketHybi10) ... ok
test_content_types (__main__.XhrPolling) ... ok
test_invalid_json (__main__.XhrPolling) ... ok
test_invalid_session (__main__.XhrPolling) ... ok
test_jsessionid (__main__.XhrPolling) ... ok
test_options (__main__.XhrPolling) ... ok
test_transport (__main__.XhrPolling) ... ok
test_options (__main__.XhrStreaming) ... ok
test_response_limit (__main__.XhrStreaming) ... FAIL
test_transport (__main__.XhrStreaming) ... ok

## Analysis
### some failures are common, what's interesting is that some tests are now fully working!

* ProtocolQuirks.test_closeSession_another_connection - (present only in 0.1) no idea what's the issue here. It just won't die.

* Protocol.test_closeSession - times out (not sure if this is an issue with my test script?)
* WebsocketHixie76.test_broken_json - this one has some broken dependencies (module import error) on my machine (which most likely means - dependency changed a little) but even after fixing it, doesn't seem to work. Which may or may not be due to the fact, that dependency (https://github.com/liris/websocket-client/) behavior changed.
* WebsocketHybi10.test_close - again close seems to be an issue
* JsonPolling.test_transport - fails in 0.1, but WORKS fine in 0.2!
* WebsocketHixie76.test_close - again with close. AssertionError: 'h' != u'c[3000,"Go away!"]'
* XhrPolling.test_transport - fails in 0.1, but WORKS fine in 0.2!
* HandlingClose.test_abort_xhr_polling - time out. Aborting, closing and stuff seems to be the main issue.
* InfoTest.* - this one is new in 0.2, not implemented and should be part of the API.
* Protocol.test_closeSession - time out.
* RawWebsocket.* - this is something that cannot be implemented with current API (websocket without framing, heartbeats and stuff).
* WebsocketHttpErrors.test_invalidMethod - for invalid methods it wants not only 405 but also something in 'allow' tag. Doesn't check what though, but anyway it is empty.
* XhrStreaming.test_response_limit - it stopped working. Apparently, response_limit setting should not count needed by IE 2049 header ('h'*2048+'\n'). At least that's what node is using. Smells fishy.

# Let's summarize this essay
So what is really not working?
Something's wrong with closing. RawWebsockets require implementation. New Info (/info) default endpoint as well.
Rest seems to be of low priority.