mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Merge pull request #93394 from liggitt/shorten-apimachinery-test
Shorten watch restart test, run in parallel
This commit is contained in:
commit
17efe1d627
@ -64,7 +64,7 @@ func noop() {}
|
||||
|
||||
func TestWatchRestartsIfTimeoutNotReached(t *testing.T) {
|
||||
// Has to be longer than 5 seconds
|
||||
timeout := 2 * time.Minute
|
||||
timeout := 30 * time.Second
|
||||
|
||||
// Set up a master
|
||||
masterConfig := framework.NewIntegrationTestMasterConfig()
|
||||
@ -204,9 +204,11 @@ func TestWatchRestartsIfTimeoutNotReached(t *testing.T) {
|
||||
},
|
||||
}
|
||||
|
||||
t.Run("group", func(t *testing.T) {
|
||||
for _, tmptc := range tt {
|
||||
tc := tmptc // we need to copy it for parallel runs
|
||||
t.Run(tc.name, func(t *testing.T) {
|
||||
t.Parallel()
|
||||
c, err := kubernetes.NewForConfig(config)
|
||||
if err != nil {
|
||||
t.Fatalf("Failed to create clientset: %v", err)
|
||||
@ -271,4 +273,5 @@ func TestWatchRestartsIfTimeoutNotReached(t *testing.T) {
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user