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

Add cets_discovery:wait_for_get_nodes/2 #42

Merged
merged 3 commits into from
Nov 28, 2023
Merged

Conversation

arcusfelis
Copy link
Contributor

This function blocks until get_nodes returns

This function blocks until get_nodes returns
Copy link

codecov bot commented Nov 24, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (0202120) 98.19% compared to head (ac1afc3) 98.21%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #42      +/-   ##
==========================================
+ Coverage   98.19%   98.21%   +0.01%     
==========================================
  Files          10       10              
  Lines         719      727       +8     
==========================================
+ Hits          706      714       +8     
  Misses         13       13              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@arcusfelis arcusfelis marked this pull request as ready for review November 28, 2023 09:30
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

Looks good. There is a minor typo.

src/cets_discovery.erl Outdated Show resolved Hide resolved
Add disco_wait_for_get_nodes_when_get_nodes_needs_to_be_retried testcase
Copy link
Member

@chrzaszcz chrzaszcz left a comment

Choose a reason for hiding this comment

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

The added function waits for the get_nodes function to finish. It is difficult to say if it fixes the race conditions, because it is not described what it is supposed to fix. I can approve, because it works as described. We will see how it fits into MongooseIM.

@chrzaszcz chrzaszcz merged commit 4ef4a34 into main Nov 28, 2023
8 checks passed
@chrzaszcz chrzaszcz deleted the wait-for-get-nodes branch November 28, 2023 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants