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

unit tests failing due to concurrent access of the mock file system. Make it more reliable #320

Merged
merged 4 commits into from
Jan 3, 2025

Conversation

techcobweb
Copy link
Contributor

@techcobweb techcobweb commented Dec 18, 2024

Signed-off-by: Mike Cobbett [email protected]

Why ?

See issue: Unstable test in CLI causes occasional build failure. MockFS concurrency. #2094

Unit test failed occasionally because of timing/race. 2 threads concurrently accessing/updating the node map inside the mockFileSystem.

Fixed by adding mutexes around all the external calls to the file system, so the internals only run single-threaded. Rather clumsy, but simple and good enough for unit tests.

@galasa-team
Copy link

Build failed, see http://localhost:8001/api/v1/namespaces/tekton-pipelines/services/tekton-dashboard:http/proxy/#/namespaces/galasa-build/pipelineruns/repo-cli-pr-320-gtgc4-r-6bprl for details. If you are unable to do so, please contact a member of the Galasa team.

@galasa-team
Copy link

Build failed, see http://localhost:8001/api/v1/namespaces/tekton-pipelines/services/tekton-dashboard:http/proxy/#/namespaces/galasa-build/pipelineruns/repo-cli-pr-320-4nmtv for details. If you are unable to do so, please contact a member of the Galasa team.

@galasa-team
Copy link

Build failed, see http://localhost:8001/api/v1/namespaces/tekton-pipelines/services/tekton-dashboard:http/proxy/#/namespaces/galasa-build/pipelineruns/repo-cli-pr-320-7xt8c for details. If you are unable to do so, please contact a member of the Galasa team.

@galasa-team
Copy link

Build successful

@techcobweb techcobweb merged commit 0645519 into main Jan 3, 2025
6 checks passed
@techcobweb techcobweb deleted the mcobbett-mutex-locking-in-mock-filesystem branch January 3, 2025 00:27
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.

3 participants