Reduce number of synchronizations GODT-313

* [x] expononential cooldown of retries
* [x] do not trigger sync by counts
* [x] randomization of event poll interval
This commit is contained in:
Jakub Cuth
2020-04-28 14:20:37 +00:00
parent a1b01d5922
commit b15d22c8cc
9 changed files with 227 additions and 6 deletions

View File

@ -64,7 +64,7 @@ func TestEventLoopProcessMoreEvents(t *testing.T) {
}, time.Second, 10*time.Millisecond)
// For normal event we need to wait to next polling.
time.Sleep(pollInterval)
time.Sleep(pollInterval + pollIntervalSpread)
require.Eventually(t, func() bool {
return m.store.eventLoop.currentEventID == "event71"
}, time.Second, 10*time.Millisecond)