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

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

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.

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