MCPcopy Create free account
hub / github.com/ElementsProject/lightning / test_sql_parallel

Function test_sql_parallel

tests/test_plugin.py:4716–4726  ·  view source on GitHub ↗

Parallel refreshes of tables causes SQL errors: Error executing INSERT INTO chainmoves VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?); on row 0: UNIQUE constraint failed: chainmoves.created_index

(node_factory, executor)

Source from the content-addressed store, hash-verified

4714
4715
4716def test_sql_parallel(node_factory, executor):
4717 """Parallel refreshes of tables causes SQL errors:
4718 Error executing INSERT INTO chainmoves VALUES (?,?,?,?,?,?,?,?,?,?,?,?,?,?); on row 0: UNIQUE constraint failed: chainmoves.created_index
4719 """
4720 l1, l2 = node_factory.line_graph(2)
4721
4722 futs = []
4723 for _ in range(5):
4724 futs.append(executor.submit(l1.rpc.sql, "SELECT * FROM chainmoves"))
4725 for f in futs:
4726 f.result(TIMEOUT)
4727
4728
4729def test_sql_during_change(node_factory):

Callers

nothing calls this directly

Calls 1

line_graphMethod · 0.80

Tested by

no test coverage detected