mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
fix race condition in test_stale_monitor test_full_pipeline
This commit is contained in:
parent
7a7d66cf36
commit
d275890f60
@ -77,7 +77,6 @@ def test_full_pipeline(monkeypatch, user_pk):
|
|||||||
}
|
}
|
||||||
config_utils.set_config(CONFIG)
|
config_utils.set_config(CONFIG)
|
||||||
b = Bigchain()
|
b = Bigchain()
|
||||||
outpipe = Pipe()
|
|
||||||
|
|
||||||
original_txs = {}
|
original_txs = {}
|
||||||
original_txc = []
|
original_txc = []
|
||||||
@ -96,9 +95,15 @@ def test_full_pipeline(monkeypatch, user_pk):
|
|||||||
|
|
||||||
monkeypatch.undo()
|
monkeypatch.undo()
|
||||||
|
|
||||||
|
inpipe = Pipe()
|
||||||
|
# Each time the StaleTransactionMonitor pipeline runs, it reassigns
|
||||||
|
# all eligible transactions. Passing this inpipe prevents that from
|
||||||
|
# taking place more than once.
|
||||||
|
inpipe.put(())
|
||||||
|
outpipe = Pipe()
|
||||||
pipeline = stale.create_pipeline(backlog_reassign_delay=1,
|
pipeline = stale.create_pipeline(backlog_reassign_delay=1,
|
||||||
timeout=1)
|
timeout=1)
|
||||||
pipeline.setup(outdata=outpipe)
|
pipeline.setup(indata=inpipe, outdata=outpipe)
|
||||||
pipeline.start()
|
pipeline.start()
|
||||||
|
|
||||||
# to terminate
|
# to terminate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user