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

tests: don't delete open files #1346

Merged
merged 3 commits into from
Apr 12, 2021
Merged

Commits on Apr 12, 2021

  1. tests: Fix the order of rmdir and process kill

    Make sure test server processes are killed before the temporary
    directories are removed.
    
    Let Modified_Testcase handle the top-level temporary directory.
    Don't let Modified_testcase handle any subdirectories because:
     * teardown will try to remove them in the wrong order
     * removing the top level is enough
    
    Fixes theupdateframework#1344
    
    Signed-off-by: Jussi Kukkonen <[email protected]>
    Jussi Kukkonen committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    1b7fca4 View commit details
    Browse the repository at this point in the history
  2. tests: Remove temp directories after other cleanup

    Call the parent (Modified_Testcase) tearDown as the last thing in
    tearDown(). This is good practice anyway and in practice may prevent
    bugs where the instance needs to cleanup something before
    Modified_Testcase removes the temp dir.
    
    In practice there does not seem to be visible bugs in these tests
    (as the all have top level temp directory handling in tearDownClass())
    
    Signed-off-by: Jussi Kukkonen <[email protected]>
    Jussi Kukkonen committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    441a4fa View commit details
    Browse the repository at this point in the history
  3. tests: Kill processes before deleting temp files

    These tests seem to try to remove temp files before the processes
    using those files had stopped. This likely lead to an error (and
    dangling temp files) on Windows, but Modified_Testcase hides the error
    
    Make sure temp directories are removed as the last thing in teardown.
    
    Signed-off-by: Jussi Kukkonen <[email protected]>
    Jussi Kukkonen committed Apr 12, 2021
    Configuration menu
    Copy the full SHA
    1902975 View commit details
    Browse the repository at this point in the history