mirror of
https://github.com/siderolabs/talos.git
synced 2025-11-10 13:21:14 +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 (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
"net/url"
|
"net/url"
|
||||||
"os"
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
@ -118,7 +119,9 @@ func (suite *ApplyConfigSuite) TestApply() {
|
|||||||
Mode: machineapi.ApplyConfigurationRequest_REBOOT,
|
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
|
return nil
|
||||||
}, assertRebootedRebootTimeout,
|
}, 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 {
|
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...))
|
_, err := apiSuite.Client.Version(client.WithNodes(ctx, nodes...))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
continue
|
continue
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user