File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -41,7 +41,8 @@ def run_test(self):
41
41
42
42
self .log .info ("Test that longpoll waits if we do nothing" )
43
43
thr = LongpollThread (self .nodes [0 ])
44
- thr .start ()
44
+ with self .nodes [0 ].assert_debug_log (["ThreadRPCServer method=getblocktemplate" ], timeout = 3 ):
45
+ thr .start ()
45
46
# check that thread still lives
46
47
thr .join (5 ) # wait 5 seconds or until thread exits
47
48
assert thr .is_alive ()
@@ -55,14 +56,16 @@ def run_test(self):
55
56
56
57
self .log .info ("Test that longpoll will terminate if we generate a block ourselves" )
57
58
thr = LongpollThread (self .nodes [0 ])
58
- thr .start ()
59
+ with self .nodes [0 ].assert_debug_log (["ThreadRPCServer method=getblocktemplate" ], timeout = 3 ):
60
+ thr .start ()
59
61
self .generate (self .nodes [0 ], 1 ) # generate a block on own node
60
62
thr .join (5 ) # wait 5 seconds or until thread exits
61
63
assert not thr .is_alive ()
62
64
63
65
self .log .info ("Test that introducing a new transaction into the mempool will terminate the longpoll" )
64
66
thr = LongpollThread (self .nodes [0 ])
65
- thr .start ()
67
+ with self .nodes [0 ].assert_debug_log (["ThreadRPCServer method=getblocktemplate" ], timeout = 3 ):
68
+ thr .start ()
66
69
# generate a transaction and submit it
67
70
self .miniwallet .send_self_transfer (from_node = random .choice (self .nodes ))
68
71
# after one minute, every 10 seconds the mempool is probed, so in 80 seconds it should have returned
You can’t perform that action at this time.
0 commit comments