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

Assert change stream becomes idle #17386

Merged

Conversation

SimonRichardson
Copy link
Member

@SimonRichardson SimonRichardson commented May 16, 2024

Adds a test function to ensure that the change stream becomes idle before checking the side affect of the function. This ensures that waiting for a certain set of watcher changes happen after a known clean slate.

This should improve the reliability of the watcher tests after a known side effect.

Checklist

  • Code style: imports ordered, good names, simple structure, etc
  • Comments saying why design decisions were made
  • Go unit tests, with comments saying what you're testing

QA steps

$ TEST_PACKAGES="./domain/controllerconfig" make run-go-tests 

Adds a test function to ensure that the change stream becomes idle
before checking the side effect of the function. This ensures that
waiting for a certain set of watcher changes happen after a known
clean slate.

This should improve reliability of the watcher tests after a known
side effect.
Copy link
Member

@manadart manadart left a comment

Choose a reason for hiding this comment

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

Very good.

@SimonRichardson
Copy link
Member Author

/merge

@jujubot jujubot merged commit 3c2ce0c into juju:main May 17, 2024
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
3 participants