HBASE-30275 TestRecoveryPersistentBucketCache#testBucketCacheRecovery…#8456
HBASE-30275 TestRecoveryPersistentBucketCache#testBucketCacheRecovery…#8456mnpoonia wants to merge 1 commit into
Conversation
wchevreuil
left a comment
There was a problem hiding this comment.
Thanks for submitting this fix.
Just a nit comment: should we set pollDelay and pollInterval to 10ms? IIUC, Awaitility sets these to 100ms, by default.
|
Thanks @wchevreuil. i was thinking the same but then i thought how much difference will pollinterval of 10 ms and 100 ms would make. But Now i see that adding it will make sure test behaviour would be same as before. I will add it. |
|
@wchevreuil Added the pollDelay and pollInterval of 10ms. Please review. |
| // getBlock() checks) is set to true only in the finally block that follows. Waiting on | ||
| // backingMapValidated alone leaves a race window; await both conditions together. | ||
| await().atMost(Duration.ofSeconds(30)).pollDelay(Duration.ofMillis(10)) | ||
| .pollInterval(Duration.ofMillis(10)).until( |
There was a problem hiding this comment.
You're right — Awaitility's pollDelay defaults to the same value as pollInterval when not explicitly set. So we could have written just:
await().atMost(Duration.ofSeconds(30))
.pollInterval(Duration.ofMillis(10)).until(...)
and it would have the same behavior (10ms initial delay, 10ms between polls). Setting both explicitly just makes the intent clearer. What do you think.
If you want it concise, we can remove pollDelay
There was a problem hiding this comment.
Setting both explicitly just makes the intent clearer
Agreed,thanks
…WithAllocationInconsistencies has a race condition between backingMapValidated and cacheState=ENABLED

…WithAllocationInconsistencies has a race condition between backingMapValidated and cacheState=ENABLED