Permalink
Browse files

use a bigger timeout for slower machine

  • Loading branch information...
1 parent a23d26a commit 3c5f5a0864738caecd1608bae4e04668864df18d @tw0517tw tw0517tw committed Apr 1, 2016
Showing with 10 additions and 9 deletions.
  1. +2 −1 gulpfile.js
  2. +8 −8 test/socket.io.js
View
@@ -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);
View
@@ -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');
@@ -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) {
@@ -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');
@@ -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){
@@ -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'] });
@@ -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) {
@@ -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'] });
@@ -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) {

0 comments on commit 3c5f5a0

Please sign in to comment.