mirror of
https://github.com/bigchaindb/bigchaindb.git
synced 2024-10-13 13:34:05 +00:00
Merge pull request #846 from bigchaindb/fix-stale-pipeline-bug
Fix race condition in test_stale_monitor.py:test_full_pipeline
This commit is contained in:
commit
957a548465
@ -77,7 +77,6 @@ def test_full_pipeline(monkeypatch, user_pk):
|
||||
}
|
||||
config_utils.set_config(CONFIG)
|
||||
b = Bigchain()
|
||||
outpipe = Pipe()
|
||||
|
||||
original_txs = {}
|
||||
original_txc = []
|
||||
@ -96,9 +95,15 @@ def test_full_pipeline(monkeypatch, user_pk):
|
||||
|
||||
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,
|
||||
timeout=1)
|
||||
pipeline.setup(outdata=outpipe)
|
||||
pipeline.setup(indata=inpipe, outdata=outpipe)
|
||||
pipeline.start()
|
||||
|
||||
# to terminate
|
||||
|
Loading…
x
Reference in New Issue
Block a user