Skip to content

Clean up RavenDB temp files after tests complete - #6024

Merged
rbev merged 1 commit into
masterfrom
remove-test-temp-folder
Oct 20, 2026
Merged

rbev merged 1 commit into
masterfrom
remove-test-temp-folder

Conversation

@rbev

@rbev rbev commented Oct 19, 2026

Copy link
Copy Markdown
Contributor

Summary

RavenDB tests leave per-process Voron scratch, journal, and buffer files in RavenDBServer/Temp. These files accumulate across runs and do not provide reusable state for subsequent tests.

  • Delete the stopped server’s ravendb-<pid>-* files from both shared RavenDB test lifecycles. Preserve other processes’ files and server binaries.
  • Dispose the server even if retrieving its process ID fails or is canceled.
  • Delete the throughput database alongside the primary database during persistence test teardown.

Production behavior remains unchanged. Cleanup targets the current server process, not files left by earlier runs. Forced termination can still leave files behind.

@rbev
rbev force-pushed the remove-test-temp-folder branch from e82fe19 to 0358993 Compare October 19, 2026 07:56

@warwickschroeder warwickschroeder 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.

Looks good, but mostly does nothing on Windows. On windows, raven opens those temp files as delete-on-close. I guess we should show some love to our linux/mac users though..

@rbev
rbev merged commit d30bdb0 into master Oct 20, 2026
66 of 70 checks passed
@rbev
rbev deleted the remove-test-temp-folder branch October 20, 2026 08:16
@rbev rbev changed the title Remove test temp folder Clean up RavenDB temp files after tests complete Oct 20, 2026
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