test: check session timeout in http2

Two instances of a similar test exist, with both testing the timeout on
the stream and neither on the session. Adjust one of them to test the
session timeout instead.

PR-URL: https://github.com/nodejs/node/pull/16754
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
This commit is contained in:
Anatoli Papirovski 2017-11-04 13:45:58 -04:00
parent 6af68d0e63
commit daeb7a64a5
No known key found for this signature in database
GPG Key ID: 614E2E1ABEB4B2C0

View File

@ -43,10 +43,6 @@ server.on('stream', common.mustCall((stream) => {
'Content-Length': content.length.toString(), 'Content-Length': content.length.toString(),
'Vary': 'Accept-Encoding' 'Vary': 'Accept-Encoding'
}); });
stream.setTimeout(serverTimeout);
stream.on('timeout', () => {
assert.strictEqual(didReceiveData, false, 'Should not timeout');
});
stream.end(); stream.end();
})); }));
server.setTimeout(serverTimeout); server.setTimeout(serverTimeout);