Giter VIP home page Giter VIP logo

sockjs-gevent's Introduction

gevent-sockjs

A work in progress gevent server backend for SockJS. General goal is to have a faithful implemention of @majek's sockjs-protocol that plays nicely with gevent & green threads.

Somewhat unstable at the moment, does not pass all sockjs-protocol tests.

Running

To run the dev server

pip install -r requirements.txt
python gevent_sockjs/devserver.py

To run tests

Will create a sockjs virtualenv in either your WORKON_HOME or in the currrent directory if you don't have virtualenvwrapper.

make tests/Makefile
setup.py test

Or manually:

mkvirtualenv sockjs
pip install -r tests/test_deps.txt

Test Status:

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

Test Coverage

Name                        Stmts   Miss  Cover
-----------------------------------------------
gevent_sockjs/errors           21     13    38%
gevent_sockjs/handler         211    175    17%
gevent_sockjs/protocol         56     26    54%
gevent_sockjs/router           87     53    39%
gevent_sockjs/server           53     25    53%
gevent_sockjs/session          73     45    38%
gevent_sockjs/sessionpool      58     42    28%
gevent_sockjs/static           37     25    32%
gevent_sockjs/transports      102     62    39%
-----------------------------------------------
TOTAL                         698    466    33%

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.