itest: remove extra graph topology subscription

This commit is contained in:
yyforyongyu committed 2021-09-17 07:50:42 +08:00
1 parent 92cd6657c5
commit a58543d1c7
2 files changed
+99 -70

No files matched your search

+4 -3
View File
@@ -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: