Skip to content

Race condition tests#213

Merged
petersilva merged 2 commits into
developmentfrom
issue174_tests
Jul 1, 2025
Merged

Race condition tests#213
petersilva merged 2 commits into
developmentfrom
issue174_tests

Conversation

@reidsunderland

Copy link
Copy Markdown
Member

This adds the tests to go with the changes in MetPX/sarracenia#1452

It uses a plugin to re-order messages.

When deleting a directory that contains files, normally all the files are deleted, then the directory itself gets deleted. If these messages are processed in the wrong order by the subscriber, the directory deletion should fail because it's not empty. With the new Python code, the failed deletion will get retried.

When a link is being overwritten, first a link is created with a temporary name, then it gets renamed to the correct name, overwriting the old link in the process.

The plugin re-orders messages to force:

  1. directory deletions to be attempted before all the directory's contents have been deleted
  2. link renames to be attempted before the link is created

@petersilva petersilva left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ran the tests on my 24.04 laptop, and it works.

@petersilva
petersilva merged commit 707d21d into development Jul 1, 2025
8 of 12 checks passed
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.

2 participants