Merge pull request #93394 from liggitt/shorten-apimachinery-test

Shorten watch restart test, run in parallel
This commit is contained in:
Kubernetes Prow Robot 2020-09-02 12:09:06 -07:00 committed by GitHub
commit 17efe1d627
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {
}
})
}
})
}