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

test_in_tail: Fix unstable tests #3767

Merged
merged 8 commits into from Jun 2, 2022
Merged

test_in_tail: Fix unstable tests #3767

merged 8 commits into from Jun 2, 2022

Commits on Jun 1, 2022

  1. test_in_tail: Fix wrong rotation tests on Windows

    `sub_test_rotate_file` should pass a rotated file to block, not a new
    file. In addition, it should be opened by `Fluent::FileWrapper` to avoid
    locking.
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    3fbcc11 View commit details
    Browse the repository at this point in the history
  2. test_in_tail: Check emitted events of rotation tests by one `assert_e…

    …qual`
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    eec3974 View commit details
    Browse the repository at this point in the history
  3. test_in_tail: Make sure to wait completing first read

    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    65af256 View commit details
    Browse the repository at this point in the history
  4. test_in_tail: Always create new temp directory for each tests

    On windows, sometimes fails to remove old test files, it makes tests
    unstable.
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    90ad37d View commit details
    Browse the repository at this point in the history
  5. test_in_tail: Simplify cleanup_directory and cleanup_file

    Since we always create a new test ditectory on each tests, ensuring to
    remove old directory in hacky way is no longer needed.
    In addition, we already dropped Ruby 2.6 support, and the previous
    implementation has some bugs. For example `FileUtils.rm_f` doesn't
    have `secure` option even though the latest Ruby (v3.1), probably it
    intend `FileUtils.rm_r`.
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    a065d02 View commit details
    Browse the repository at this point in the history
  6. test_in_tail: Fix failed tests on GNU/Linux

    * TestWithSystem should call super at setup and teadown
    * EX_* should be placed just under TailInputTest
    
    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    bcba06f View commit details
    Browse the repository at this point in the history
  7. CI: Drop Ruby 2.6

    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    4f3b7f3 View commit details
    Browse the repository at this point in the history
  8. test_in_tail: Fix some omitted tests on Windows

    Signed-off-by: Takuro Ashie <ashie@clear-code.com>
    ashie committed Jun 1, 2022
    Copy the full SHA
    e041b61 View commit details
    Browse the repository at this point in the history