MCPcopy Create free account
hub / github.com/ElementsProject/elements / run_test

Method run_test

test/functional/feature_shutdown.py:22–32  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

20 self.supports_cli = False
21
22 def run_test(self):
23 node = get_rpc_proxy(self.nodes[0].url, 1, timeout=600, coveragedir=self.nodes[0].coverage_dir)
24 # Force connection establishment by executing a dummy command.
25 node.getblockcount()
26 Thread(target=test_long_call, args=(node,)).start()
27 # Wait until the server is executing the above `waitfornewblock`.
28 self.wait_until(lambda: len(self.nodes[0].getrpcinfo()['active_commands']) == 2)
29 # Wait 1 second after requesting shutdown but not before the `stop` call
30 # finishes. This is to ensure event loop waits for current connections
31 # to close.
32 self.stop_node(0, wait=1000)
33
34if __name__ == '__main__':
35 ShutdownTest().main()

Callers

nothing calls this directly

Calls 4

get_rpc_proxyFunction · 0.90
startMethod · 0.45
wait_untilMethod · 0.45
stop_nodeMethod · 0.45

Tested by

no test coverage detected