FoundationDB / fdb-kubernetes-operator

A kubernetes operator for FoundationDB
Apache License 2.0
241 stars 82 forks source link

Check if the namespace is created by the same test suite #2097

Closed johscheuer closed 3 months ago

johscheuer commented 3 months ago

Description

Prevent cases where two concurrent test suites will choose the same random namespace and cluster name. This change will make sure that only one test suite will take the namespace and the other test suite will generate a new random name. This will prevent cases where those two concurrent test suites use the same namespace, which will cause a failure of both test cases.

Type of change

Please select one of the options below.

Discussion

-

Testing

Ran a manual test (the test suite was picking the same namespace as I defined it with the according environment variable):

Operator Stress when creating and deleting a cluster multiple times should create a healthy and available cluster [e2e]
/Users/jscheuermann/go/src/github.com/FoundationDB/fdb-kubernetes-operator/e2e/test_operator_stress/operator_stress_test.go:53
  2024/07/04 12:38:08 created namespace jscheuermann
  2024/07/04 12:38:09 namespace jscheuermann already in use by test suite: operator-test, current test suite: operator-stress
  2024/07/04 12:38:10 created namespace jscheuermann

Documentation

-

Follow-up

-

foundationdb-ci commented 3 months ago

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

foundationdb-ci commented 3 months ago

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

foundationdb-ci commented 3 months ago

Result of fdb-kubernetes-operator-pr on Linux CentOS 7

johscheuer commented 3 months ago

The test failures above were unrelated to this change.

foundationdb-ci commented 3 months ago

Result of fdb-kubernetes-operator-pr on Linux CentOS 7