Skip to content

Commit

Permalink
use a bigger timeout for slower machine
Browse files Browse the repository at this point in the history
  • Loading branch information
tw0517tw committed Apr 11, 2016
1 parent a23d26a commit 3c5f5a0
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
3 changes: 2 additions & 1 deletion gulpfile.js
Expand Up @@ -27,7 +27,8 @@ gulp.task('test', ['transpile'], function(){
.pipe(mocha({
slow: 200,
reporter: 'spec',
bail: true
bail: true,
timeout: 10000
}))
.once('error', function (err) {
console.error(err.stack);
Expand Down
16 changes: 8 additions & 8 deletions test/socket.io.js
Expand Up @@ -800,7 +800,7 @@ describe('socket.io', function(){
setTimeout(function() {
sio.of('/chat').emit('ev', 'data');
sio.of('/chat').volatile.emit('ev', 'data');
}, 20);
}, 50);
});

var socket = client(srv, '/chat');
Expand All @@ -812,7 +812,7 @@ describe('socket.io', function(){
setTimeout(function() {
expect(counter).to.be(1);
done();
}, 200);
}, 500);
});

it('should emit volatile event', function(done) {
Expand All @@ -825,7 +825,7 @@ describe('socket.io', function(){
// Wait to make sure there are no packets being sent for opening the connection
setTimeout(function() {
sio.of('/chat').volatile.emit('ev', 'data');
}, 20);
}, 100);
});

var socket = client(srv, '/chat');
Expand All @@ -837,7 +837,7 @@ describe('socket.io', function(){
setTimeout(function() {
expect(counter).to.be(1);
done();
}, 200);
}, 500);
});

it('should enable compression by default', function(done){
Expand Down Expand Up @@ -1154,7 +1154,7 @@ describe('socket.io', function(){
// Wait to make sure there are no packets being sent for opening the connection
setTimeout(function() {
s.volatile.emit('ev', 'data');
}, 20);
}, 100);
});

var socket = client(srv, { transports: ['polling'] });
Expand All @@ -1166,7 +1166,7 @@ describe('socket.io', function(){
setTimeout(function() {
expect(counter).to.be(1);
done();
}, 200);
}, 500);
});

it('should emit volatile event (ws)', function(done) {
Expand Down Expand Up @@ -1205,7 +1205,7 @@ describe('socket.io', function(){
setTimeout(function() {
s.volatile.emit('ev', 'data');
s.volatile.emit('ev', 'data');
}, 20);
}, 100);
});

var socket = client(srv, { transports: ['polling'] });
Expand All @@ -1217,7 +1217,7 @@ describe('socket.io', function(){
setTimeout(function() {
expect(counter).to.be(1);
done();
}, 200);
}, 500);
});

it('should emit only one consecutive volatile event (ws)', function(done) {
Expand Down

0 comments on commit 3c5f5a0

Please sign in to comment.