From 404bddd2a4bc3d010e636ca0eeb3487a9caec2d9 Mon Sep 17 00:00:00 2001 From: Jeremy Wharton Date: Wed, 8 Nov 2023 11:05:15 -0600 Subject: [PATCH] cmd/storj-sim: increase satellite contact grace period This change increases the grace period within which test satellites are expected to respond after being instantiated. Our Jenkins build pipeline for GitHub was failing because the grace period was too short. Change-Id: I8bfd7c771660fc39f6eb988f95d706809f936d00 --- cmd/storj-sim/network.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/cmd/storj-sim/network.go b/cmd/storj-sim/network.go index 240e1a57e..3e05b1f1d 100644 --- a/cmd/storj-sim/network.go +++ b/cmd/storj-sim/network.go @@ -39,6 +39,8 @@ const ( maxStoragenodeCount = 200 folderPermissions = 0744 + + gatewayGracePeriod = 10 * time.Second ) var defaultAccess = "12edqtGZnqQo6QHwTB92EDqg9B1WrWn34r7ALu94wkqXL4eXjBNnVr6F5W7GhJjVqJCqxpFERmDR1dhZWyMt3Qq5zwrE9yygXeT6kBoS9AfiPuwB6kNjjxepg5UtPPtp4VLp9mP5eeyobKQRD5TsEsxTGhxamsrHvGGBPrZi8DeLtNYFMRTV6RyJVxpYX6MrPCw9HVoDQbFs7VcPeeRxRMQttSXL3y33BJhkqJ6ByFviEquaX5R2wjQT2Kx" @@ -536,11 +538,11 @@ func newNetwork(flags *Flags) (*Processes, error) { return fmt.Errorf("failed to read config string: %w", err) } - // try with 100ms delays until we hit 3s + // try with 100ms delays until we exceed the grace period apiKey, start := "", time.Now() for apiKey == "" { apiKey, err = newConsoleEndpoints(consoleAddress).createOrGetAPIKey(context.Background()) - if err != nil && time.Since(start) > 3*time.Second { + if err != nil && time.Since(start) > gatewayGracePeriod { return fmt.Errorf("failed to create account: %w", err) } time.Sleep(100 * time.Millisecond)