-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
WIP: Run integration tests in profile in parallel #4665
Conversation
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: medyagh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice work cleaning up our tests! It looks good, I just have a couple of recommendations for readability.
@@ -76,7 +76,7 @@ func readLineWithTimeout(b *bufio.Reader, timeout time.Duration) (string, error) | |||
|
|||
func testDashboard(t *testing.T) { | |||
t.Parallel() | |||
minikubeRunner := NewMinikubeRunner(t) | |||
minikubeRunner := NewMinikubeRunner(t, "") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passing an empty string to a function is a code smell, as the meaning of the string is completely mysterious to readers. Let's not do that. Three alternative ideas come to mind:
- Perhaps
NewMinikubeRunner
should randomly generate the profile name. It gets populated in the return object anyways, so that clients can retrieve it if they need it. This may make test cleanup trickier, but makes parallelism easier. - NewMinikubeRunner could allow a config struct to be passed, where one of the options is a name.
- There could be two functions: one for a named runner, and one for a default named runner.
t.Skipf("skipping %s - incompatible with none driver", test.name) | ||
for _, tc := range tests { | ||
t.Run(tc.name, func(t *testing.T) { | ||
testName := tc.name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just use tc.name
rather than introducing a second variable representing the test name.
@medyagh: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
closing in favor of #4665 |
Closes #4592