mirror of
https://github.com/lightninglabs/loop
synced 2024-11-08 01:10:29 +00:00
Merge pull request #596 from GeorgeTsagk/autoloop-false-positive-check
liquidity: add false-positive checks on autoloop tests
This commit is contained in:
commit
0be05a99cc
@ -344,6 +344,24 @@ func (c *autoloopTestCtx) autoloop(step *autoloopStep) {
|
||||
return c.manager.numActiveStickyLoops() == 0
|
||||
}, defaultEventuallyTimeout, defaultEventuallyInterval, "failed to"+
|
||||
" wait for sticky loop counter")
|
||||
|
||||
// Since we're checking if any false-positive swaps were dispatched we
|
||||
// need to give some time to autoloop to possibly dispatch them.
|
||||
select {
|
||||
case <-c.outRequest:
|
||||
c.t.Fatal("expected no more loopout requests")
|
||||
|
||||
case <-c.inRequest:
|
||||
c.t.Fatal("expected no more loopin requests")
|
||||
|
||||
case <-c.quoteRequestIn:
|
||||
c.t.Fatal("expected no more loopout quote requests")
|
||||
|
||||
case <-c.quoteRequest:
|
||||
c.t.Fatal("expected no more loopin quote requests")
|
||||
|
||||
case <-time.After(500 * time.Millisecond):
|
||||
}
|
||||
}
|
||||
|
||||
// easyautoloop walks our test context through the process of triggering our
|
||||
@ -383,6 +401,24 @@ func (c *autoloopTestCtx) easyautoloop(step *easyAutoloopStep, noop bool) {
|
||||
actual.OutgoingChanSet,
|
||||
)
|
||||
}
|
||||
|
||||
// Since we're checking if any false-positive swaps were dispatched we
|
||||
// need to give some time to autoloop to possibly dispatch them.
|
||||
select {
|
||||
case <-c.outRequest:
|
||||
c.t.Fatal("expected no more loopout requests")
|
||||
|
||||
case <-c.inRequest:
|
||||
c.t.Fatal("expected no more loopin requests")
|
||||
|
||||
case <-c.quoteRequestIn:
|
||||
c.t.Fatal("expected no more loopout quote requests")
|
||||
|
||||
case <-c.quoteRequest:
|
||||
c.t.Fatal("expected no more loopin quote requests")
|
||||
|
||||
case <-time.After(500 * time.Millisecond):
|
||||
}
|
||||
}
|
||||
|
||||
// matchLoopOuts checks that the actual loop out requests we got match the
|
||||
|
Loading…
Reference in New Issue
Block a user