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

WIP: Run integration tests in profile in parallel #4665

Closed
wants to merge 20 commits into from

Conversation

medyagh
Copy link
Member

@medyagh medyagh commented Jul 2, 2019

Closes #4592

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Jul 2, 2019
@k8s-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 2, 2019
@medyagh medyagh changed the title Run integration tests in profile in parallel WIP: Run integration tests in profile in parallel Jul 3, 2019
@k8s-ci-robot k8s-ci-robot added the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Jul 3, 2019
Copy link
Contributor

@tstromberg tstromberg left a 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.

pkg/util/kubernetes.go Outdated Show resolved Hide resolved
test/integration/util/common.go Outdated Show resolved Hide resolved
@@ -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, "")
Copy link
Contributor

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
Copy link
Contributor

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.

test/integration/util/kubectl_runner.go Outdated Show resolved Hide resolved
test/integration/util/kubectl_runner.go Outdated Show resolved Hide resolved
@medyagh medyagh added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jul 17, 2019
@k8s-ci-robot
Copy link
Contributor

@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.

@k8s-ci-robot k8s-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 17, 2019
@medyagh medyagh added ok-to-test Indicates a non-member PR verified by an org member that is safe to test. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jul 17, 2019
@medyagh
Copy link
Member Author

medyagh commented Jul 24, 2019

closing in favor of #4665

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. ok-to-test Indicates a non-member PR verified by an org member that is safe to test. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Run as many integration tests as possible in parallel using profile
3 participants