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
This commit is contained in:
Jeremy Wharton 2023-11-08 11:05:15 -06:00 committed by Storj Robot
parent b56a158100
commit 404bddd2a4

View File

@ -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)