Flaky test: port-forwarding for the component
: Possible custom port collision when running tests in parallel
#6758
Labels
area/testing
Issues or PRs related to testing, Quality Assurance or Quality Engineering
kind/bug
Categorizes issue or PR as related to a bug.
Milestone
/kind bug
/area testing
What versions of software are you using?
Operating System:
Fedora 37
Output of
odo version
:odo v3.9.0 (b843ce8)
How did you run odo exactly?
Actual behavior
Tests won't pass, due to conflicting ports, as we can see in the logs below:
Logs on Podman
When running against a cluster, the tests pass, but looking deeper into the logs, we can see that port-forwarding did not actually start.
Logs on cluster
Expected behavior
We are currently relying on a global counter to get a free port to use as custom port, as we can see in
helper_http.go
.The problem is that Ginkgo actually runs parallel specs in different processes, so they will have their own counter. See https://onsi.github.io/ginkgo/#mental-model-how-ginkgo-runs-parallel-specs
A simple solution could be to rely on the index of the process using
GinkgoParallelProcess()
.The text was updated successfully, but these errors were encountered: