Browse Source
tests: fix test_find_path_for_payment. need to close sqlite connection
test was sometimes randomly failing
(always on Windows, as it's illegal to rm open files there)
dependabot/pip/contrib/deterministic-build/ecdsa-0.13.3
SomberNight
5 years ago
No known key found for this signature in database
GPG Key ID: B33B5F232C6271E9
2 changed files with
5 additions and
1 deletions
-
electrum/sql_db.py
-
electrum/tests/test_lnrouter.py
|
@ -54,4 +54,5 @@ class SqlDB(Logger): |
|
|
self.conn.commit() |
|
|
self.conn.commit() |
|
|
# write |
|
|
# write |
|
|
self.conn.commit() |
|
|
self.conn.commit() |
|
|
|
|
|
self.conn.close() |
|
|
self.logger.info("SQL thread terminated") |
|
|
self.logger.info("SQL thread terminated") |
|
|
|
@ -105,7 +105,10 @@ class Test_LNRouter(TestCaseForTestnet): |
|
|
self.assertEqual(route[0].node_id, start_node) |
|
|
self.assertEqual(route[0].node_id, start_node) |
|
|
self.assertEqual(route[0].short_channel_id, bfh('0000000000000003')) |
|
|
self.assertEqual(route[0].short_channel_id, bfh('0000000000000003')) |
|
|
|
|
|
|
|
|
|
|
|
# need to duplicate tear_down here, as we also need to wait for the sql thread to stop |
|
|
|
|
|
self.asyncio_loop.call_soon_threadsafe(self._stop_loop.set_result, 1) |
|
|
|
|
|
self._loop_thread.join(timeout=1) |
|
|
|
|
|
cdb.sql_thread.join(timeout=1) |
|
|
|
|
|
|
|
|
def test_new_onion_packet(self): |
|
|
def test_new_onion_packet(self): |
|
|
# test vector from bolt-04 |
|
|
# test vector from bolt-04 |
|
|