mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
Merge pull request #3720 from satnam6502/separate_clients
Use a fresh client for each Go end-to-end test
This commit is contained in:
commit
fa3cb5547d
@ -73,8 +73,6 @@ func RunE2ETests(authConfig, certDir, host, repoRoot, provider string, orderseed
|
|||||||
glog.Fatalf("This test has timed out. Cleanup not guaranteed.")
|
glog.Fatalf("This test has timed out. Cleanup not guaranteed.")
|
||||||
}()
|
}()
|
||||||
|
|
||||||
c := loadClientOrDie()
|
|
||||||
|
|
||||||
tests := []testSpec{
|
tests := []testSpec{
|
||||||
/* Disable TestKubernetesROService due to rate limiter issues.
|
/* Disable TestKubernetesROService due to rate limiter issues.
|
||||||
TODO: Add this test back when rate limiting is working properly.
|
TODO: Add this test back when rate limiting is working properly.
|
||||||
@ -133,6 +131,8 @@ func RunE2ETests(authConfig, certDir, host, repoRoot, provider string, orderseed
|
|||||||
// between runs.)
|
// between runs.)
|
||||||
orderseed = time.Now().UnixNano() & (1<<32 - 1)
|
orderseed = time.Now().UnixNano() & (1<<32 - 1)
|
||||||
}
|
}
|
||||||
|
// TODO(satnam6502): When the tests are run in parallel we will
|
||||||
|
// no longer need the shuffle.
|
||||||
shuffleTests(tests, rand.New(rand.NewSource(orderseed)))
|
shuffleTests(tests, rand.New(rand.NewSource(orderseed)))
|
||||||
glog.Infof("Tests shuffled with orderseed %#x\n", orderseed)
|
glog.Infof("Tests shuffled with orderseed %#x\n", orderseed)
|
||||||
|
|
||||||
@ -140,7 +140,10 @@ func RunE2ETests(authConfig, certDir, host, repoRoot, provider string, orderseed
|
|||||||
passed := true
|
passed := true
|
||||||
for i, test := range tests {
|
for i, test := range tests {
|
||||||
glog.Infof("Running test %d %s", i+1, test.name)
|
glog.Infof("Running test %d %s", i+1, test.name)
|
||||||
testPassed := test.test(c)
|
// A client is made for each test. This allows us to attribute
|
||||||
|
// issues with rate ACLs etc. to a specific test and supports
|
||||||
|
// parallel testing.
|
||||||
|
testPassed := test.test(loadClientOrDie())
|
||||||
if !testPassed {
|
if !testPassed {
|
||||||
glog.Infof(" test %d failed", i+1)
|
glog.Infof(" test %d failed", i+1)
|
||||||
passed = false
|
passed = false
|
||||||
|
Loading…
Reference in New Issue
Block a user