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

Simplify test context management #1598

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

nirs
Copy link
Member

@nirs nirs commented Oct 22, 2024

We had 2 places using a test context - test suites, and action helpers. To work with both, we store the test context in a map and had complicated search mechanism to locate the context in both the parent and child sub-tests. This failed randomly since the map was not protected with a mutex.

Simplify the design by implementing the actions (deploy, enable, ..) in the test context. With this we can create a test context instance and pass it to the code running a test flow, and we don't need to manage any global state.

Fixes: #1571

We had 2 places using a test context - test suites, and action helpers.
To work with both, we store the test context in a map and had
complicated search mechanism to locate the context in both the parent
and child sub-tests. This failed randomly since the map was not
protected with a mutex.

Simplify the design by implementing the actions (deploy, enable, ..) in
the test context. With this we can create a test context instance and
pass it to the code running a test flow, and we don't need to manage any
global state.

Fixes: RamenDR#1571
Signed-off-by: Nir Soffer <nsoffer@redhat.com>
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

Successfully merging this pull request may close these issues.

e2e flake: fatal error: concurrent map read and map write
1 participant