-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
[tests] Force tick on FwdEventTicker #1975
Conversation
dbf5d6c
to
e2527b9
Compare
e2527b9
to
d4c19d8
Compare
d4c19d8
to
9efacc9
Compare
9efacc9
to
4c021c3
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! ✅
htlcswitch/switch_test.go
Outdated
bobLog.Lock() | ||
t.Fatalf("expected 5 events in event log, instead "+ | ||
"found: %v", spew.Sdump(bobLog.events)) | ||
bobLog.Unlock() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps this should be deferred? The t.Fatal
call shouldn't allow it to get to this point.
EDIT: not that it matters much I guess, since the tests will halt anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
True, good catch :)
4c021c3
to
c9868aa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! 🚀
Ensures events are properly flushed on
FwdEventTick
. Should also help with the flaky coverage reports.