[Pkg-javascript-commits] [sockjs-client] 170/350: Allow 2051 text length on streaming test because of proxies

tonnerre at ancient-solutions.com tonnerre at ancient-solutions.com
Fri Aug 5 01:04:11 UTC 2016


This is an automated email from the git hooks/post-receive script.

tonnerre-guest pushed a commit to branch upstream
in repository sockjs-client.

commit 0126037d119120385e1b202748271e0dce2d73b6
Author: Bryce Kahle <bkahle at gmail.com>
Date:   Fri Oct 17 16:13:34 2014 -0400

    Allow 2051 text length on streaming test because of proxies
---
 tests/lib/senders.js | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tests/lib/senders.js b/tests/lib/senders.js
index deb2e30..7a07eff 100644
--- a/tests/lib/senders.js
+++ b/tests/lib/senders.js
@@ -22,7 +22,8 @@ function ajaxStreaming (Obj) {
     var x = new Obj('GET', testUtils.getOriginUrl() + '/streaming.txt', null);
     x.on('chunk', function (status, text) {
       expect(status).to.equal(200);
-      expect(text.length).to.be.lessThan(2050);
+      // 2051 because of transparent proxies
+      expect([2049, 2051]).to.contain(text.length);
       x.removeAllListeners('chunk');
     });
     x.on('finish', function (status, text) {
@@ -38,8 +39,8 @@ function wrongUrl(Obj, url, statuses) {
     // Selenium has a long timeout for when it can't connect to the port
     this.timeout(20000);
     var x = new Obj('GET', url, null);
-    x.on('chunk', function () {
-      expect().fail('No chunk should be received');
+    x.on('chunk', function (status, text) {
+      expect().fail('No chunk should be received: ' + status + ', ' + text);
     });
     x.on('finish', function (status, text) {
       expect(statuses).to.contain(status);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/sockjs-client.git



More information about the Pkg-javascript-commits mailing list