swarm: enforce waitkademlia for snapshot tests

This commit is contained in:
Fabio Barone 2018-07-20 09:51:56 -05:00
parent bf9c27a166
commit 25d20af3a4
2 changed files with 9 additions and 16 deletions

View file

@ -199,11 +199,9 @@ func runFileRetrievalTest(nodeCount int) error {
if err != nil {
return err
}
if *waitKademlia {
if _, err := sim.WaitTillHealthy(ctx, 2); err != nil {
return err
}
}
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
// or until the timeout is reached.
@ -354,11 +352,9 @@ func runRetrievalTest(chunkCount int, nodeCount int) error {
if err != nil {
return err
}
if *waitKademlia {
if _, err := sim.WaitTillHealthy(ctx, 2); err != nil {
return err
}
}
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
// or until the timeout is reached.

View file

@ -200,11 +200,10 @@ func testSyncing(t *testing.T, chunkCount int, nodeCount int) {
}
conf.hashes = append(conf.hashes, hashes...)
mapKeysToNodes(conf)
if *waitKademlia {
if _, err := sim.WaitTillHealthy(ctx, 2); err != nil {
return err
}
}
// File retrieval check is repeated until all uploaded files are retrieved from all nodes
// or until the timeout is reached.
@ -408,11 +407,9 @@ func runSyncTest(chunkCount int, nodeCount int) error {
conf.hashes = append(conf.hashes, hashes...)
mapKeysToNodes(conf)
if *waitKademlia {
if _, err := sim.WaitTillHealthy(ctx, 2); err != nil {
return err
}
}
var gDir string
var globalStore *mockdb.GlobalStore