cloud_controller_ng icon indicating copy to clipboard operation
cloud_controller_ng copied to clipboard

Fix flaky test in security_group_unapply_spec

Open svkrieger opened this issue 1 year ago • 5 comments

Just a small fix for a flaky test.

  • [x] I have reviewed the contributing guide

  • [x] I have viewed, signed, and submitted the Contributor License Agreement

  • [x] I have made this pull request to the main branch

  • [x] I have run all the unit tests using bundle exec rake

  • [ ] I have run CF Acceptance Tests

svkrieger avatar Oct 15 '24 14:10 svkrieger

@moleske as you are the initial author of these tests, could you verify that my change here does not mess with the semantics of the tests? I'm not sure why > 1.second.ago was used and whether it is important.

svkrieger avatar Oct 16 '24 07:10 svkrieger

Looking at the original PR https://github.com/cloudfoundry/cloud_controller_ng/pull/2832 I think we just wanted to make sure that some time had passed. This was made for the diego feature of dynamic asg and we wanted to make sure the time in the table was later than the original time. I don't think there's anything special about 1 second, just a small amount of time we felt was reasonable. Tagging @xandroc as I see his name on the PR and he may have thoughts since no else on that pr is particularly active in the project anymore

If this solution is working out here, I'd suggest going through the linked pr and fixing other tests that also do > 1.second.ago as they are likely flakey as well

moleske avatar Oct 17 '24 02:10 moleske

👍🏽 I think this is a good change, agree with @moleske it's likely worth updating the remaining tests

xandroc avatar Oct 22 '24 19:10 xandroc

@moleske @xandroc thank you for the feedback. I adjusted the other tests as well.

svkrieger avatar Oct 23 '24 14:10 svkrieger

lgtm!

xandroc avatar Oct 23 '24 15:10 xandroc