Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use a fresh client for each Go end-to-end test #3720

Merged
merged 1 commit into from
Jan 22, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions test/e2e/driver.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,6 @@ func RunE2ETests(authConfig, certDir, host, repoRoot, provider string, orderseed
glog.Fatalf("This test has timed out. Cleanup not guaranteed.")
}()

c := loadClientOrDie()

tests := []testSpec{
/* Disable TestKubernetesROService due to rate limiter issues.
TODO: Add this test back when rate limiting is working properly.
Expand Down Expand Up @@ -133,14 +131,19 @@ func RunE2ETests(authConfig, certDir, host, repoRoot, provider string, orderseed
// between runs.)
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)))
glog.Infof("Tests shuffled with orderseed %#x\n", orderseed)

info := []testInfo{}
passed := true
for i, test := range tests {
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 {
glog.Infof(" test %d failed", i+1)
passed = false
Expand Down