Skip to content

Commit

Permalink
chain/ethereum: Give consecutive reorg tests more time
Browse files Browse the repository at this point in the history
  • Loading branch information
Jannis committed Dec 16, 2019
1 parent ca29ca1 commit f3363e6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions chain/ethereum/tests/network_indexer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -577,23 +577,23 @@ fn indexing_handles_consecutive_reorgs() {
// Create a forked chain after block #3
let third_chain = create_fork(initial_chain.clone(), 2, 30);

// Run the network indexer for 3s and collect its events
// Run the network indexer for 10s and collect its events
let chains = vec![
initial_chain.clone(),
second_chain.clone(),
third_chain.clone(),
];
run_network_indexer(store, None, chains, Duration::from_secs(3)).and_then(
run_network_indexer(store, None, chains, Duration::from_secs(10)).and_then(
move |(chains, events)| {
thread::spawn(move || {
// Trigger the first reorg after 1s
// Trigger the first reorg after 2s
{
thread::sleep(Duration::from_secs(1));
thread::sleep(Duration::from_secs(2));
chains.lock().unwrap().advance_to_next_chain();
}
// Trigger the second reorg after 2s
// Trigger the second reorg after 4s
{
thread::sleep(Duration::from_secs(1));
thread::sleep(Duration::from_secs(2));
chains.lock().unwrap().advance_to_next_chain();
}
});
Expand Down

0 comments on commit f3363e6

Please sign in to comment.