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,10 +199,8 @@ func runFileRetrievalTest(nodeCount int) error {
if err != nil { if err != nil {
return err return err
} }
if *waitKademlia { if _, err := sim.WaitTillHealthy(ctx, 2); err != nil {
if _, err := sim.WaitTillHealthy(ctx, 2); err != nil { return err
return err
}
} }
// File retrieval check is repeated until all uploaded files are retrieved from all nodes // File retrieval check is repeated until all uploaded files are retrieved from all nodes
@ -354,10 +352,8 @@ func runRetrievalTest(chunkCount int, nodeCount int) error {
if err != nil { if err != nil {
return err return err
} }
if *waitKademlia { if _, err := sim.WaitTillHealthy(ctx, 2); err != nil {
if _, err := sim.WaitTillHealthy(ctx, 2); err != nil { return err
return err
}
} }
// File retrieval check is repeated until all uploaded files are retrieved from all nodes // File retrieval check is repeated until all uploaded files are retrieved from all nodes

View file

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