mirror of
https://github.com/zulip/zulip.git
synced 2026-06-18 21:01:52 +08:00
Disallow XHR streaming when running the test suite
There seems to be some sort of bug involving PhantomJS and XHR streaming messages. When successive pages are loaded that use XHR streaming, PhantomJS seems to think the second one never finishes loading and therefore hangs. (imported from commit db93b4cab816f1fdc3f3f543c9394b1cba8abedb)
This commit is contained in:
parent
b1eebc0b84
commit
89bcabbb65
@ -14,6 +14,11 @@ function Socket(url) {
|
||||
|
||||
this._supported_protocols = ['websocket', 'xdr-streaming', 'xhr-streaming',
|
||||
'xdr-polling', 'xhr-polling', 'jsonp-polling'];
|
||||
if (page_params.test_suite) {
|
||||
this._supported_protocols = _.reject(this._supported_protocols,
|
||||
function (x) { return x === 'xhr-streaming'; });
|
||||
}
|
||||
|
||||
this._sockjs = new SockJS(url, null, {protocols_whitelist: this._supported_protocols});
|
||||
this._setup_sockjs_callbacks(this._sockjs);
|
||||
}
|
||||
|
||||
@ -704,6 +704,7 @@ def home(request):
|
||||
# These end up in a global JavaScript Object named 'page_params'.
|
||||
page_params = simplejson.encoder.JSONEncoderForHTML().encode(dict(
|
||||
debug_mode = settings.DEBUG,
|
||||
test_suite = settings.TEST_SUITE,
|
||||
poll_timeout = settings.POLL_TIMEOUT,
|
||||
have_initial_messages = user_has_messages,
|
||||
stream_list = register_ret['subscriptions'],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user