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

fix: increase timeout and use tearDownNodes #1592

Merged
merged 4 commits into from
Oct 10, 2023
Merged

Conversation

fbarbu15
Copy link
Collaborator

@fbarbu15 fbarbu15 commented Sep 21, 2023

Problem

There are some tests that consistently fail during the CI at teardown (stopping nodes)

Solution

Added a bigger timeout and used the tearDownNodes function that better handles this job

@fbarbu15 fbarbu15 changed the title increase timeout and use tearDownNodes fix: increase timeout and use tearDownNodes Sep 21, 2023
@github-actions
Copy link

github-actions bot commented Sep 21, 2023

size-limit report 📦

Path Size Loading time (3g) Running time (snapdragon) Total time
Waku core 27.74 KB (0%) 555 ms (0%) 231 ms (-0.15% 🔽) 786 ms
Waku Simple Light Node 262.91 KB (0%) 5.3 s (0%) 636 ms (+12.54% 🔺) 5.9 s
ECIES encryption 29.58 KB (-0.45% 🔽) 592 ms (-0.45% 🔽) 264 ms (+7.75% 🔺) 856 ms
Symmetric encryption 29.59 KB (-0.45% 🔽) 592 ms (-0.45% 🔽) 243 ms (+5.24% 🔺) 835 ms
DNS discovery 110.67 KB (+0.07% 🔺) 2.3 s (+0.07% 🔺) 273 ms (-47.18% 🔽) 2.5 s
Privacy preserving protocols 117.44 KB (+0.12% 🔺) 2.4 s (+0.12% 🔺) 441 ms (+24.46% 🔺) 2.8 s
Light protocols 25.89 KB (0%) 518 ms (0%) 147 ms (-29.22% 🔽) 665 ms
History retrieval protocols 25.09 KB (0%) 502 ms (0%) 133 ms (-14.97% 🔽) 635 ms
Deterministic Message Hashing 5.65 KB (0%) 113 ms (0%) 46 ms (+14.61% 🔺) 159 ms

@fbarbu15 fbarbu15 added the E:End-to-end testing See https://github.com/waku-org/pm/issues/34 for details label Sep 21, 2023
@fbarbu15 fbarbu15 marked this pull request as ready for review September 21, 2023 10:39
@fbarbu15 fbarbu15 requested a review from a team as a code owner September 21, 2023 10:39
@fbarbu15
Copy link
Collaborator Author

Seems that it helps a little but doesn't fix the issue fully. Still 1/3 go waku jobs failed

!!nwaku && (await nwaku.stop());
!!waku && waku.stop().catch((e) => console.log("Waku failed to stop", e));
this.timeout(10000);
tearDownNodes([nwaku], [waku]);
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it only this spec that is failing with such a reason?

@fryorcraken
Copy link
Collaborator

Did you check the nwaku logs see if there is any indication of the slow shutting down?

@fbarbu15
Copy link
Collaborator Author

Did you check the nwaku logs see if there is any indication of the slow shutting down?

No, I just saw that the default timeout of 2000 ms is hit and increasing it to 10000 helps.
However even with 10000 ms there's something wrong happening sometimes, because it fails during the test with empty payload

My guess is that is somehow related to the stop of the AsyncIterator because this is the only test that uses this function
cc @weboko

@weboko
Copy link
Collaborator

weboko commented Sep 25, 2023

My guess is that is somehow related to the stop of the AsyncIterator because this is the only test that uses this function

Might be a bug in the AsyncIterator, need to investigate

@danisharora099
Copy link
Collaborator

My guess is that is somehow related to the stop of the AsyncIterator because this is the only test that uses this function

Might be a bug in the AsyncIterator, need to investigate

are we tracking this bug somewhere?

@weboko
Copy link
Collaborator

weboko commented Oct 9, 2023

@danisharora099 #1560

@fbarbu15 fbarbu15 closed this Oct 10, 2023
@fbarbu15 fbarbu15 reopened this Oct 10, 2023
@fbarbu15
Copy link
Collaborator Author

My guess is that is somehow related to the stop of the AsyncIterator because this is the only test that uses this function

Might be a bug in the AsyncIterator, need to investigate

Had a 2nd look and turns out that stop was fired imediately after the message was send and that was the reason for the failures. Adding a small delay seems to fix the issue

@fbarbu15 fbarbu15 merged commit fe64da1 into master Oct 10, 2023
10 of 11 checks passed
@fbarbu15 fbarbu15 deleted the fix/flaky-teardown branch October 10, 2023 07:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E:End-to-end testing See https://github.com/waku-org/pm/issues/34 for details
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants