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

Fix the e2e --times flag for running tests more than once #4569

Merged
merged 1 commit into from
Feb 19, 2015

Conversation

a-robinson
Copy link
Contributor

Fixes #4555.

cc @fabioy

ginkgo.RunSpecsWithDefaultAndCustomReporters(&passed, "Kubernetes e2e Suite", r)
for i := 0; i < times && passed; i++ {
ginkgo.RunSpecsWithDefaultAndCustomReporters(&passed, fmt.Sprintf("Kubernetes e2e Suite run %d of %d", i+1, times), r)
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hm. I don't think this would interact well with --report_dir, would it? (It would just overwrite the junit.xml).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair point, it does look like the last one run will win. On the plus side, we stop doing new runs if we encounter an error, meaning that any reports that get overwritten will just be reports of successes.

I'd use a different reporter for each run (junit_%d.xml), but I imagine that existing consumers are dependent on the filename.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're actually safe. Jenkins is currently consuming junit*.xml in anticipation of the line 75 comment above.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done, thanks.

@zmerlynn
Copy link
Member

LGTM

zmerlynn added a commit that referenced this pull request Feb 19, 2015
Fix the e2e --times flag for running tests more than once
@zmerlynn zmerlynn merged commit 413e1db into kubernetes:master Feb 19, 2015
@a-robinson a-robinson deleted the e2e-times branch April 27, 2015 21:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

e2e.go doesn't honor the "--times" flag for tests
2 participants