Skip to content

Ginkgo tests fail when run in parallel #102

Description

@carolynvs

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)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions