Skip to content

Commit

Permalink
fix(test): make upgrade test pass (#1772)
Browse files Browse the repository at this point in the history
  • Loading branch information
DonutEspresso committed Apr 15, 2019
1 parent 5c07d5c commit d30b748
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 8 deletions.
4 changes: 0 additions & 4 deletions Makefile
Expand Up @@ -70,9 +70,5 @@ docs-build:
benchmark:
@(cd ./benchmark && $(NPM) i && $(NODE) index.js)

.PHONY: audit
audit:
@($(NPM) audit || true)

include ./tools/mk/Makefile.deps
include ./tools/mk/Makefile.targ
2 changes: 1 addition & 1 deletion test/server.test.js
Expand Up @@ -34,7 +34,7 @@ var FAST_CLIENT;
var SERVER;

if (SKIP_IP_V6) {
console.warning('IPv6 tests are skipped: No IPv6 network is available');
console.warn('IPv6 tests are skipped: No IPv6 network is available');
}

///--- Tests
Expand Down
5 changes: 3 additions & 2 deletions test/upgrade.test.js
Expand Up @@ -174,8 +174,7 @@ test('Dueling upgrade and response handling 1', function(t) {
}

try {
var upg = res.claimUpgrade();
upg.socket.destroy();
res.claimUpgrade();
} catch (ex) {
done('expected requestUpgrade error');
}
Expand Down Expand Up @@ -205,6 +204,8 @@ test('Dueling upgrade and response handling 1', function(t) {
res.on('end', function() {
done('client response');
});
// noop data listener required for resume to take effect
res.on('data', function() {});
res.resume();
});
req.on('upgradeResult', function(err2, res) {
Expand Down
2 changes: 1 addition & 1 deletion tools/mk/Makefile.targ
Expand Up @@ -244,4 +244,4 @@ $(DOC_MEDIA_DIRS_BUILD):
test:

.PHONY: prepush
prepush: check test audit
prepush: check test

0 comments on commit d30b748

Please sign in to comment.