mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-25 20:53:33 +00:00
Shorten watch restart test, run in parallel
This commit is contained in:
parent
04ecdb9eb6
commit
c778008420
@ -64,7 +64,7 @@ func noop() {}
|
|||||||
|
|
||||||
func TestWatchRestartsIfTimeoutNotReached(t *testing.T) {
|
func TestWatchRestartsIfTimeoutNotReached(t *testing.T) {
|
||||||
// Has to be longer than 5 seconds
|
// Has to be longer than 5 seconds
|
||||||
timeout := 2 * time.Minute
|
timeout := 30 * time.Second
|
||||||
|
|
||||||
// Set up a master
|
// Set up a master
|
||||||
masterConfig := framework.NewIntegrationTestMasterConfig()
|
masterConfig := framework.NewIntegrationTestMasterConfig()
|
||||||
@ -204,9 +204,11 @@ func TestWatchRestartsIfTimeoutNotReached(t *testing.T) {
|
|||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
|
t.Run("group", func(t *testing.T) {
|
||||||
for _, tmptc := range tt {
|
for _, tmptc := range tt {
|
||||||
tc := tmptc // we need to copy it for parallel runs
|
tc := tmptc // we need to copy it for parallel runs
|
||||||
t.Run(tc.name, func(t *testing.T) {
|
t.Run(tc.name, func(t *testing.T) {
|
||||||
|
t.Parallel()
|
||||||
c, err := kubernetes.NewForConfig(config)
|
c, err := kubernetes.NewForConfig(config)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("Failed to create clientset: %v", err)
|
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