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

fix: addressed lockfile and tempdir issues #57

Open
wants to merge 1,557 commits into
base: main
Choose a base branch
from

Conversation

0xObsidian
Copy link

@0xObsidian 0xObsidian commented Nov 28, 2024

Two issues were causing static file test failures:

  1. Missing lockfile in test file count
  2. Premature cleanup of temporary test directories

Bug Description

  1. File Count Mismatch:

    • Tests expected 10 files (9 static files + 1 lockfile)
    • Only had 9 files because lockfile wasn't created
    • Led to assertion failures in file count checks
  2. Directory Cleanup Race:

    • TempDir was being dropped too early due to pattern matching:
      let (static_dir, _) = create_test_static_files_dir();
      
    • Caused test directory to be cleaned up while tests were still running
    • Worked in isolation but failed in full test suite

Reproduction

Pull the previous commit and run from project root:

make test-unit

Fixes made

  • Added lockfile creation before static file operations
  • Fixed file count assertions
  • Fixed premature cleanup of test directories

Testing the fix

Pull this commit and run the test suite:

make test-unit

tcoratger and others added 30 commits November 15, 2024 09:41
mattsse and others added 30 commits November 26, 2024 16:21
Two issues were causing static file test failures:
1. Missing lockfile in test file count
2. Premature cleanup of temporary test directories

Bug Description
===============
1. File Count Mismatch:
   - Tests expected 10 files (9 static files + 1 lockfile)
   - Only had 9 files because lockfile wasn't created
   - Led to assertion failures in file count checks

2. Directory Cleanup Race:
   - TempDir was being dropped too early due to pattern matching:
     ```
     let (static_dir, _) = create_test_static_files_dir();
     ```
   - Caused test directory to be cleaned up while tests were still running
   - Worked in isolation but failed in full test suite

Reproduction Steps
==================
Pull the previous commit and run from project root:
```
make test-unit
```

Fix
===
- Added lockfile creation before static file operations
- Fixed file count assertions
- Fixed premature cleanup of test directories

Testing the fix
===============
Pull ths commit and run the test suite:
```
make test-unit
```
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.