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

Ginkgo tests fail when run in parallel #102

Open
carolynvs opened this issue Apr 21, 2022 · 1 comment
Open

Ginkgo tests fail when run in parallel #102

carolynvs opened this issue Apr 21, 2022 · 1 comment
Assignees

Comments

@carolynvs
Copy link
Member

When I run make test locally it always fails with

STEP: tearing down the test environment


STEP: bootstrapping test environment
1.65058046721266e+09	DEBUG	controller-runtime.test-env	using existing cluster
1.650580467212675e+09	DEBUG	controller-runtime.test-env	automatically acquiring client configuration


Failure [0.008 seconds]
[BeforeSuite] BeforeSuite
/Users/carolynvs/src/kubernetes-plugins/tests/integration/operator/ginkgo/suite_test.go:42

  Unexpected error:
      <*errors.errorString | 0x14000118930>: {
          s: "unable to grab random port for serving webhooks on: lstat /Users/carolynvs/Library/Caches/kubebuilder-envtest/./port-63025: no such file or directory",
      }
      unable to grab random port for serving webhooks on: lstat /Users/carolynvs/Library/Caches/kubebuilder-envtest/./port-63025: no such file or directory
  occurred

  /Users/carolynvs/src/kubernetes-plugins/tests/integration/operator/ginkgo/suite_test.go:51

It's always some % of the parallel tests that fail for me. When they do fail, I can see from the log that they all tried to use the same random port number. I'm not sure if that's the problem, or perhaps we need to call envtest differently to run in parallel safely?

When I force it to run just once, with -p -nodes 1, then the tests pass. On the CI server, it has only one vCPU so I think it's not actually running in parallel. On my machine there are definitely 4 available cores.

@sgettys @bdegeeter Can you verify that this works on your machine (with multiple cores)?

@bdegeeter bdegeeter self-assigned this Apr 21, 2022
@bdegeeter
Copy link
Collaborator

Parallel tests is just a "nice to have" that we were testing. I'll change the default to not rely on it.

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

No branches or pull requests

2 participants