Closed gdavison closed 6 years ago
Merging #482 into master will decrease coverage by
2.17%
. The diff coverage is6.25%
.
@@ Coverage Diff @@
## master #482 +/- ##
==========================================
- Coverage 61.72% 59.54% -2.18%
==========================================
Files 7 8 +1
Lines 337 393 +56
==========================================
+ Hits 208 234 +26
- Misses 129 159 +30
Impacted Files | Coverage Δ | |
---|---|---|
libraries/consul_acl.rb | 46.42% <6.25%> (ø) |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5fd61fb...0eb5b64. Read the comment docs.
@legal90 I've removed some bits I should have removed when I copied the code. It was originally much more general, but I've made it specific here.
I haven't tried it for real, because we don't use ACLs yet. My main reason for adding this was to remove the intermittent test failures. I've added an additional attempt, so it will give 1.5 seconds for the consul service to start. It can definitely be tuned if needed.
Hi @johnbellone, any feedback on the PR?
Fixes #461
@johnbellone, yes, it would (still) fail in this case if the local Consul agent were not yet available. Before this change, there would be a race condition which caused intermittent failures, at least is the tests. Now, the behaviour is to try three times before failing.
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
When starting up a new machine and creating an ACL, the Consul server is not always ready to serve requests by the time the ACL is ready to be created. This causes intermittent failures in integration tests, and likely in real-world use.
Two retries with an interval of 0.5 seconds seems to work.
Also addressed some
cookstyle
issues