Skip to content

Commit 31d491f

Browse files
committed
envtest: 1m timeouts
Signed-off-by: Dr. Stefan Schimanski <stefan.schimanski@gmail.com>
1 parent aebe439 commit 31d491f

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

envtest/internal/controlplane/shard.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,11 @@ import (
2525
"strings"
2626
"time"
2727

28-
ctrllog "sigs.k8s.io/controller-runtime/pkg/log"
29-
3028
"github.com/kcp-dev/multicluster-provider/envtest/internal/addr"
3129
"github.com/kcp-dev/multicluster-provider/envtest/internal/certs"
3230
"github.com/kcp-dev/multicluster-provider/envtest/internal/process"
3331
)
3432

35-
var log = ctrllog.Log.WithName("controlplane")
36-
3733
const (
3834
// saKeyFile is the name of the service account signing private key file.
3935
saKeyFile = "sa-signer.key"
@@ -94,7 +90,7 @@ type Shard struct {
9490
// StartTimeout, StopTimeout specify the time the Shard is allowed to
9591
// take when starting and stoppping before an error is emitted.
9692
//
97-
// If not specified, these default to 1 min and 20 seconds respectively.
93+
// If not specified, these default to 1 min.
9894
StartTimeout time.Duration
9995
StopTimeout time.Duration
10096

envtest/internal/process/process.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (ps *State) Init(name string) error {
121121
}
122122

123123
if ps.StopTimeout == 0 {
124-
ps.StopTimeout = 20 * time.Second
124+
ps.StopTimeout = time.Minute
125125
}
126126
return nil
127127
}

envtest/server.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ It's possible to override some defaults, by setting the following environment va
4545
* TEST_ASSET_KCP (string): path to the kcp binary to use
4646
* TEST_KCP_ASSETS (string): directory containing the binaries to use (kcp). Defaults to /usr/local/kcp/bin.
4747
* TEST_KCP_START_TIMEOUT (string supported by time.ParseDuration): timeout for test kcp to start. Defaults to 1m.
48-
* TEST_KCP_STOP_TIMEOUT (string supported by time.ParseDuration): timeout for test kcp to start. Defaults to 20s.
48+
* TEST_KCP_STOP_TIMEOUT (string supported by time.ParseDuration): timeout for test kcp to start. Defaults to 1m.
4949
* TEST_ATTACH_KCP_OUTPUT (boolean): if set to true, the kcp's stdout and stderr are attached to os.Stdout and os.Stderr
5050
*/
5151
const (
@@ -55,7 +55,7 @@ const (
5555
envStopTimeout = "TEST_KCP_STOP_TIMEOUT"
5656

5757
defaultKcpPlaneStartTimeout = time.Minute
58-
defaultKcpStopTimeout = 20 * time.Second
58+
defaultKcpStopTimeout = time.Minute
5959
)
6060

6161
// internal types we expose as part of our public API.

0 commit comments

Comments
 (0)