-
Notifications
You must be signed in to change notification settings - Fork 9.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Flake TestRevision #17477
Comments
Hi, from my understanding this comes from the wait timeout here:
How do you normally handle such a case? |
Following #17054 (comment), adding a I could be wrong, but it seems every Unfortunately, the fix described in #17513 is not enough as "do not timeout" causes the very first There is also this
I believe to fix this, we would need to know when the func newFakerClock() *fakerClock {
return &fakerClock{
FakeClock: clockwork.NewFakeClock(),
afterRequest: make(chan struct{}),
}
}
func (frc *fakerClock) After(d time.Duration) <-chan time.Time {
select {
case frc.afterRequest <- struct{}{}:
default:
}
return frc.FakeClock.After(d)
}
func TestRevision(t *testing.T) {
fc := newFakerClock() // <- this changed
rg := &fakeRevGetter{testutil.NewRecorderStreamWithWaitTimout(math.MaxInt64), 0} // <- this changed
compactable := &fakeCompactable{testutil.NewRecorderStreamWithWaitTimout(10 * time.Millisecond)}
tb := newRevision(zaptest.NewLogger(t), fc, 10, rg, compactable)
tb.Run()
defer tb.Stop()
<-fc.afterRequest // <- this is new
fc.Advance(revInterval)
rg.Wait(1)
// ... though I do not know if that is an acceptable solution. |
Which github workflows are flaking?
unit tests
Which tests are flaking?
go.etcd.io/etcd/server/v3/etcdserver/api/v3compactor: TestRevision
Github Action link
https://prow.k8s.io/view/gs/kubernetes-jenkins/pr-logs/pull/etcd-io_etcd/17469/pull-etcd-unit-test/1760242318838861824
Reason for failure (if possible)
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: