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

github: replace call for sleep with wait-for-it.sh #81

Merged
merged 2 commits into from
Sep 4, 2024
Merged

github: replace call for sleep with wait-for-it.sh #81

merged 2 commits into from
Sep 4, 2024

Conversation

mkmkme
Copy link
Collaborator

@mkmkme mkmkme commented Sep 2, 2024

Previously integration tests invoked sleep 10 to "give time to settle" the environment. In a fast container, waiting for so long is not needed and in a slow one it might not be enough.

This commit changes this line to use ./util/wait-for-it.sh instead [1] to check robustly that the port is being listened to.

Fixes #49.

[1] https://github.com/vishnubob/wait-for-it

Pull Request check-list

Please make sure to review and check all of these items:

  • Do tests and lints pass with this change?
  • Do the CI tests pass with this change (enable it first in your forked repo and wait for the github action build to finish)?
  • Is the new or changed code fully tested?
  • Is a documentation update included (if this change modifies existing APIs, or introduces new ones)?
  • Is there an example added to the examples folder (if applicable)?

NOTE: these things are not required to open a PR and can be done
afterwards / while the PR is open.

Description of change

Please provide a description of the change here.

@codecov-commenter
Copy link

codecov-commenter commented Sep 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.12%. Comparing base (b10b338) to head (798569b).

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #81   +/-   ##
=======================================
  Coverage   75.11%   75.12%           
=======================================
  Files         132      132           
  Lines       34397    34400    +3     
=======================================
+ Hits        25837    25842    +5     
+ Misses       8560     8558    -2     

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

@aiven-sal aiven-sal enabled auto-merge September 4, 2024 11:04
Previously integration tests invoked `sleep 10` to "give time to settle"
the environment. In a fast container, waiting for so long is not needed
and in a slow one it might not be enough.

This commit changes this line to use `./util/wait-for-it.sh` instead [1]
to check robustly that the port is being listened to.

Fixes #49.

[1] https://github.com/vishnubob/wait-for-it

Signed-off-by: Mikhail Koviazin <[email protected]>
If the cluster has just been started, `CLUSTER SLOTS` returns an empty
array. `NodesManager.initialize` did not take this into account and took
the first element unconditionally causing `IndexError`.

This commit makes it raise `ValkeyClusterException` with a clear error
message instead.

Signed-off-by: Mikhail Koviazin <[email protected]>
Copy link
Member

@aiven-sal aiven-sal left a comment

Choose a reason for hiding this comment

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

Great thanks! 2

@aiven-sal aiven-sal merged commit b424517 into valkey-io:main Sep 4, 2024
74 checks passed
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.

Improve the way CI waits for containers to start
3 participants