Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: speed up parallel/test-tls-session-cache #18424

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions test/parallel/test-tls-session-cache.js
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,11 @@ function doTest(testOptions, callback) {
server.on('newSession', function(id, data, cb) {
++newSessionCount;
// Emulate asynchronous store
setTimeout(function() {
setImmediate(() => {
assert.ok(!session);
session = { id, data };
cb();
}, 1000);
});
});
server.on('resumeSession', function(id, callback) {
++resumeCount;
Expand All @@ -89,9 +89,9 @@ function doTest(testOptions, callback) {
}

// Just to check that async really works there
setTimeout(function() {
setImmediate(() => {
callback(null, data);
}, 100);
});
});

server.listen(0, function() {
Expand Down Expand Up @@ -132,7 +132,7 @@ function doTest(testOptions, callback) {
}
assert.strictEqual(code, 0);
server.close(common.mustCall(function() {
setTimeout(callback, 100);
setImmediate(callback);
}));
}));
}
Expand Down