mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-09 12:51:15 +01:00
test: try to clear connection refused more aggressively
Try to stabilize some tests. Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
This commit is contained in:
parent
51db5279c4
commit
53ce93aaed
@ -9,6 +9,7 @@ package api
|
||||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"net/url"
|
||||
"os"
|
||||
"testing"
|
||||
@ -118,7 +119,9 @@ func (suite *ApplyConfigSuite) TestApply() {
|
||||
Mode: machineapi.ApplyConfigurationRequest_REBOOT,
|
||||
},
|
||||
)
|
||||
suite.Assert().NoErrorf(err, "failed to apply configuration (node %q)", node)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to apply configuration (node %q): %w", node, err)
|
||||
}
|
||||
|
||||
return nil
|
||||
}, assertRebootedRebootTimeout,
|
||||
|
||||
@ -398,7 +398,7 @@ func (apiSuite *APISuite) ClearConnectionRefused(ctx context.Context, nodes ...s
|
||||
}
|
||||
|
||||
apiSuite.Require().NoError(retry.Constant(backoff.DefaultConfig.MaxDelay, retry.WithUnits(time.Second)).Retry(func() error {
|
||||
for range numMasterNodes {
|
||||
for range numMasterNodes * 5 {
|
||||
_, err := apiSuite.Client.Version(client.WithNodes(ctx, nodes...))
|
||||
if err == nil {
|
||||
continue
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user