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

remove assert for no events in spec watcher tests after adding files to be watched #6651

merged 1 commit into from Jun 13, 2019


Copy link

commented Jun 12, 2019

These tests have been pandomly failing recently. Likely since we just switched windows tests to docker.

All these tesst had this pattern:

        let sw = SpecWatcher::run(&spec_dir).expect("Couldn't create a SpecWatcher!");
        assert!(!sw.has_events(), "There should be no events to start");
        file_with_content(&dir, "foo.spec", "fooooooo").expect("couldn't create file");
                "Need to allow for the debounce interval to pass before you can expect events");
        while !sw.has_events() {

This assumes that the time it takes to get from run to the 2nd assert! will be shorter than the debounce period. Probably a sensible assumption in most cases but absolutely no guarantee and changing infra like we did with the move to docker could absolutely impact this.

At a closer glance, this second assert seems unnecesary. These tests are primarily concerned with if the events are getting registered at all so removing the assert should make the tests more reliable and keep them valid.

Signed-off-by: mwrock

remove assert for no events in spec watcher tests after adding files …
…to be watched

Signed-off-by: mwrock <>

This comment has been minimized.

Copy link

commented Jun 12, 2019

Hello mwrock! Thanks for the pull request!

Here is what will happen next:

  1. Your PR will be reviewed by the maintainers.
  2. If everything looks good, one of them will approve it, and your PR will be merged.

Thank you for contributing!

@mwrock mwrock self-assigned this Jun 13, 2019

@mwrock mwrock merged commit c163a05 into master Jun 13, 2019

5 checks passed

DCO This commit has a DCO Signed-off-by
buildkite/habitat-sh-habitat-master-verify Build #2326 passed (28 minutes, 7 seconds)
buildkite/habitat-sh-habitat-master-website Build #2668 passed (37 seconds)
continuous-integration/travis-ci/pr The Travis CI build passed
expeditor/config-validation Validated your Expeditor config file

@mwrock mwrock deleted the debounce_this branch Jun 13, 2019

chef-ci added a commit that referenced this pull request Jun 13, 2019

Update with details from pull request #6651
Obvious fix; these changes are the result of automation not creative thinking.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.