itest: remove extra graph topology subscription
This commit is contained in:
2 files changed
+99
-70
No files matched your search
+4
-3
@@ -5,17 +5,18 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// PollInterval is a constant specifying a 200 ms interval.
|
||||
const PollInterval = 200 * time.Millisecond
|
||||
|
||||
// Predicate is a helper test function that will wait for a timeout period of
|
||||
// time until the passed predicate returns true. This function is helpful as
|
||||
// timing doesn't always line up well when running integration tests with
|
||||
// several running lnd nodes. This function gives callers a way to assert that
|
||||
// some property is upheld within a particular time frame.
|
||||
func Predicate(pred func() bool, timeout time.Duration) error {
|
||||
const pollInterval = 200 * time.Millisecond
|
||||
|
||||
exitTimer := time.After(timeout)
|
||||
for {
|
||||
<-time.After(pollInterval)
|
||||
<-time.After(PollInterval)
|
||||
|
||||
select {
|
||||
case <-exitTimer:
|
||||
|
||||
Reference in new issue
Block a user