Skip to content

Commit

Permalink
Fixed headers/keepalive tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas committed May 21, 2020
1 parent b375b44 commit 71ff7da
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions test/headers_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,10 @@ describe('request headers', function() {

it('no open sockets remain after request', function(done) {
send_request({}, function(err, resp) {
get_active_sockets().length.should.eql(existing_sockets);
done();
setTimeout(function() {
get_active_sockets().length.should.eql(existing_sockets);
done();
}, 10)
});
})

Expand All @@ -79,8 +81,10 @@ describe('request headers', function() {

it('no open sockets remain after request', function(done) {
send_request({ connection: 'close' }, function(err, resp) {
get_active_sockets().length.should.eql(existing_sockets);
done();
setTimeout(function() {
get_active_sockets().length.should.eql(existing_sockets);
done();
}, 10)
});
})

Expand Down Expand Up @@ -160,8 +164,10 @@ describe('request headers', function() {

it('no open sockets remain after request', function(done) {
send_request({ connection: 'close' }, function(err, resp) {
get_active_sockets().length.should.eql(existing_sockets);
done();
setTimeout(function() {
get_active_sockets().length.should.eql(existing_sockets);
done();
}, 10);
});
})

Expand Down

0 comments on commit 71ff7da

Please sign in to comment.