Skip to content
New issue

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

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

Already on GitHub? # to your account

fix(tests): wait for Redis to stop #18507

Merged
merged 1 commit into from
Mar 4, 2025
Merged

Conversation

chenba
Copy link
Contributor

@chenba chenba commented Mar 4, 2025

No description provided.

@chenba chenba force-pushed the try-waiting-for-redis-to-stop branch from 1cf05f9 to c4fa107 Compare March 4, 2025 18:00
@chenba chenba force-pushed the try-waiting-for-redis-to-stop branch from c4fa107 to cf466f5 Compare March 4, 2025 18:36
console.log('mail_helper started...');
printMatchingKeys(true);
return resolve({
close() {
return new Promise((resolve, reject) => {
let smtpClosed = false;
let apiClosed = false;
redis.quit();
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We were seeing errors because we did not wait for this before resolving the promise.

let stops = 0;
const cb = () => {
stops += 1;
if (stops >= numStops) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really want to spend the CI credit to update this to ++stops >= numStops; sorry about the extra line.

@chenba chenba marked this pull request as ready for review March 4, 2025 19:18
@chenba chenba requested a review from a team as a code owner March 4, 2025 19:18
@chenba chenba merged commit 32ee0f3 into main Mar 4, 2025
23 checks passed
@chenba chenba deleted the try-waiting-for-redis-to-stop branch March 4, 2025 19:45
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants