loop+test: enhance epoch subscription for multiple subscribers

This commit is contained in:
George Tsagkarelis 2024-01-15 17:07:25 +01:00
parent b43fa11cc1
commit 26e239c2c7
No known key found for this signature in database
GPG key ID: E08DEA9B12B66AF6
4 changed files with 62 additions and 27 deletions

View file

@ -250,3 +250,11 @@ func (ctx *testContext) assertPreimagePush(preimage lntypes.Preimage) {
ctx.Context.T.Fatalf("preimage not pushed")
}
}
func (ctx *testContext) AssertEpochListeners(numListeners int32) {
ctx.Context.T.Helper()
require.Eventually(ctx.Context.T, func() bool {
return ctx.Lnd.EpochSubscribers() == numListeners
}, test.Timeout, time.Millisecond*250)
}