Skip to content

Commit 73574d9

Browse files
committed
lntest: add timeouts for windows
For Windows the tests run much slower so we create customized timeouts for them.
1 parent d7f8fa6 commit 73574d9

File tree

2 files changed

+41
-2
lines changed

2 files changed

+41
-2
lines changed

lntest/wait/timeouts.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
//go:build !darwin && !kvdb_etcd && !kvdb_postgres
2-
// +build !darwin,!kvdb_etcd,!kvdb_postgres
1+
//go:build !darwin && !windows && !kvdb_etcd && !kvdb_postgres
2+
// +build !darwin,!windows,!kvdb_etcd,!kvdb_postgres
33

44
package wait
55

lntest/wait/timeouts_windows.go

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
//go:build windows && !kvdb_etcd && !kvdb_postgres
2+
// +build windows,!kvdb_etcd,!kvdb_postgres
3+
4+
package wait
5+
6+
import "time"
7+
8+
const (
9+
// MinerMempoolTimeout is the max time we will wait for a transaction
10+
// to propagate to the mining node's mempool.
11+
MinerMempoolTimeout = time.Minute
12+
13+
// ChannelOpenTimeout is the max time we will wait before a channel to
14+
// be considered opened.
15+
ChannelOpenTimeout = time.Second * 30
16+
17+
// ChannelCloseTimeout is the max time we will wait before a channel is
18+
// considered closed.
19+
ChannelCloseTimeout = time.Second * 30
20+
21+
// DefaultTimeout is a timeout that will be used for various wait
22+
// scenarios where no custom timeout value is defined.
23+
DefaultTimeout = time.Second * 60
24+
25+
// AsyncBenchmarkTimeout is the timeout used when running the async
26+
// payments benchmark.
27+
AsyncBenchmarkTimeout = time.Minute * 5
28+
29+
// NodeStartTimeout is the timeout value when waiting for a node to
30+
// become fully started.
31+
NodeStartTimeout = time.Minute * 3
32+
33+
// SqliteBusyTimeout is the maximum time that a call to the sqlite db
34+
// will wait for the connection to become available.
35+
SqliteBusyTimeout = time.Second * 10
36+
37+
// PaymentTimeout is the timeout used when sending payments.
38+
PaymentTimeout = time.Second * 120
39+
)

0 commit comments

Comments
 (0)