Skip to content

Conversation

@carlfriedrich
Copy link
Contributor

📚 Description

This PR resolves an issue where temporary files and directories bashunit creates implicitly during a parallel run were not properly cleaned up.

It adds both a unit test an an acceptance test that fail without the fix and now pass.

This issue already existed before my changes in #483 .

🔖 Changes

  • Add a new function parallel::cleanup and call it in each exit point when parallel mode is enabled

Side note: the previous parallel::reset function (which I renamed to parallel::init now) contained the following line:

[ -f "$TEMP_FILE_PARALLEL_STOP_ON_FAILURE" ] && rm "$TEMP_FILE_PARALLEL_STOP_ON_FAILURE"

IMO the condition [ -f "$TEMP_FILE_PARALLEL_STOP_ON_FAILURE" ] could never be true, as the containing directory is deleted right before the line. Hence I removed it. If it served any purpose I overlooked, please tell me.

✅ To-do list

  • I updated the CHANGELOG.md to reflect the new feature or fix
  • I updated the documentation to reflect the changes
@Chemaclass Chemaclass added the bug Something isn't working label Sep 6, 2025
Copy link
Member

@Chemaclass Chemaclass left a comment

Choose a reason for hiding this comment

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

Nice catch. Thank you!

@Chemaclass Chemaclass merged commit f597139 into TypedDevs:main Sep 6, 2025
18 checks passed
@carlfriedrich carlfriedrich deleted the fix/clean-parallel-temp-folder branch September 7, 2025 09:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

2 participants