Add timeout to long sync tests (#1111)

WorldStateDownloaderTest can get in an infinite loop.  Add a timeout rule.
Signed-off-by: Adrian Sutton <adrian.sutton@consensys.net>
pull/2/head
Danno Ferrin 6 years ago committed by GitHub
parent da4d484685
commit 27abe3ae45
  1. 4
      ethereum/eth/src/test/java/tech/pegasys/pantheon/ethereum/eth/sync/worldstate/WorldStateDownloaderTest.java

@ -86,10 +86,14 @@ import java.util.stream.StreamSupport;
import com.google.common.util.concurrent.ThreadFactoryBuilder;
import org.junit.After;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.Timeout;
public class WorldStateDownloaderTest {
@Rule public Timeout globalTimeout = Timeout.seconds(60); // 1 minute max per test
private static final Hash EMPTY_TRIE_ROOT = Hash.wrap(MerklePatriciaTrie.EMPTY_TRIE_NODE_HASH);
private final BlockDataGenerator dataGen = new BlockDataGenerator(1);

Loading…
Cancel
Save