File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -1194,6 +1194,22 @@ def test_listincome_timebox(node_factory, bitcoind):
11941194 incomes = l1 .rpc .bkpr_listincome (end_time = first_one )['income_events' ]
11951195 assert [i for i in incomes if i ['timestamp' ] > first_one ] == []
11961196
1197+
1198+ @pytest .mark .xfail (strict = True )
1199+ @unittest .skipIf (TEST_NETWORK != 'regtest' , "Snapshots are bitcoin regtest." )
1200+ @unittest .skipIf (os .getenv ('TEST_DB_PROVIDER' , 'sqlite3' ) != 'sqlite3' , "uses snapshots" )
1201+ def test_bkpr_parallel (node_factory , bitcoind , executor ):
1202+ """Bookkeeper could crash with parallel requests"""
1203+ bitcoind .generate_block (1 )
1204+ l1 = node_factory .get_node (dbfile = "l1-before-moves-in-db.sqlite3.xz" ,
1205+ options = {'database-upgrade' : True })
1206+
1207+ fut1 = executor .submit (l1 .rpc .bkpr_listincome )
1208+ fut2 = executor .submit (l1 .rpc .bkpr_listincome )
1209+
1210+ fut1 .result ()
1211+ fut2 .result ()
1212+
11971213 # We save blockheights in storage, so make sure we restore them on restart!
11981214 acctevents_before = l1 .rpc .bkpr_listaccountevents ()
11991215 l1 .restart ()
You can’t perform that action at this time.
0 commit comments