siderolabs / omni

SaaS-simple deployment of Kubernetes - on your own hardware.
Other
395 stars 23 forks source link

fix: proper time adjustment to fix flaky TestEtcdManualBackup #346

Closed DmitriyMV closed 3 weeks ago

DmitriyMV commented 3 weeks ago

I have run it with –count=100 and it no longer fails.

The https://github.com/golang/go/issues/67434 can't come soon enough, so we can drop all fake clocks.

DmitriyMV commented 3 weeks ago

https://github.com/jonboulle/clockwork This packages has interesting BlockUntil helpers which allow to wait for the clock consumers to get blocked

Which we actually use 😁 The problem is that it doesn't account for goroutines blocking on chan read, write, mutexes, etc. https://github.com/golang/go/issues/67434 actually does account for those (and because of that it needs to be in runtime), so when you will ask it for world to stop, it will actually wait for the world to stop.

DmitriyMV commented 3 weeks ago

/m