swarm: CI race detector test adjustments (#19017)

(cherry picked from commit 27e3f96819)
This commit is contained in:
Ferenc Szabo
2019-02-08 17:07:11 +01:00
committed by Rafael Matias
parent a3db00f270
commit dcff622d43
6 changed files with 60 additions and 84 deletions

View File

@@ -44,7 +44,7 @@ var (
const (
NumberOfNets = 4
MaxTimeout = 6
MaxTimeout = 15 * time.Second
)
func init() {
@@ -146,7 +146,7 @@ func setupNetwork(numnodes int) (net *simulations.Network, err error) {
return nil, fmt.Errorf("create node %d rpc client fail: %v", i, err)
}
//now setup and start event watching in order to know when we can upload
ctx, watchCancel := context.WithTimeout(context.Background(), MaxTimeout*time.Second)
ctx, watchCancel := context.WithTimeout(context.Background(), MaxTimeout)
defer watchCancel()
watchSubscriptionEvents(ctx, nodes[i].ID(), client, errc, quitC)
//on every iteration we connect to all previous ones

View File

@@ -32,7 +32,7 @@ import (
)
var (
nodeCount = 16
nodeCount = 10
)
//This test is used to test the overlay simulation.

View File

@@ -151,7 +151,7 @@ func runFileRetrievalTest(nodeCount int) error {
return err
}
ctx, cancelSimRun := context.WithTimeout(context.Background(), 1*time.Minute)
ctx, cancelSimRun := context.WithTimeout(context.Background(), 3*time.Minute)
defer cancelSimRun()
result := sim.Run(ctx, func(ctx context.Context, sim *simulation.Simulation) error {