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: log_dir_removed_after_follow flacky test #975

Open
themilchenko opened this issue Oct 9, 2024 · 0 comments · May be fixed by #990
Open

tests: log_dir_removed_after_follow flacky test #975

themilchenko opened this issue Oct 9, 2024 · 0 comments · May be fixed by #990
Assignees
Labels
1sp flaky test The issue describes the problem with the test being flaky teamE

Comments

@themilchenko
Copy link
Contributor

There is a flacky test in test/integration/log/test_log.py::test_log_dir_removed_after_follow.

See the error log
tt_cmd = PosixPath('/tmp/pytest-of-runner/pytest-0/tt_build0/tt')
mock_env_dir = PosixPath('/tmp/pytest-of-runner/pytest-0/test_log_dir_removed_after_fol0')

    def test_log_dir_removed_after_follow(tt_cmd, mock_env_dir):
        cmd = [tt_cmd, 'log', '-f']
        process = subprocess.Popen(
            cmd,
            cwd=mock_env_dir,
            stderr=subprocess.STDOUT,
            stdout=subprocess.PIPE,
            text=True,
        )
    
        wait_for_lines_in_output(process.stdout,
                                 ['app0:inst0: line 19', 'app1:inst2: line 19',
                                  'app0:inst1: line 19', 'app1:inst1: line 19'])
    
        var_dir = os.path.join(mock_env_dir, 'ie')
        assert os.path.exists(var_dir)
        shutil.rmtree(var_dir)
    
        assert process.wait(2) == 0
>       assert "Failed to detect creation of" in process.stdout.read()
E       AssertionError: assert 'Failed to detect creation of' in '   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n'
E        +  where '   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n' = <built-in method read of _io.TextIOWrapper object at 0x7faca5077030>()
E        +    where <built-in method read of _io.TextIOWrapper object at 0x7faca5077030> = <_io.TextIOWrapper name=12 encoding='UTF-8'>.read
E        +      where <_io.TextIOWrapper name=12 encoding='UTF-8'> = <Popen: returncode: 0 args: [PosixPath('/tmp/pytest-of-runner/pytest-0/tt_bu...>.stdout

test/integration/log/test_log.py:278: AssertionError
=========================== short test summary info ============================
FAILED test/integration/log/test_log.py::test_log_dir_removed_after_follow - AssertionError: assert 'Failed to detect creation of' in '   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n'
 +  where '   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n   ⨯ no such file or directory\n' = <built-in method read of _io.TextIOWrapper object at 0x7faca5077030>()
 +    where <built-in method read of _io.TextIOWrapper object at 0x7faca5077030> = <_io.TextIOWrapper name=12 encoding='UTF-8'>.read
 +      where <_io.TextIOWrapper name=12 encoding='UTF-8'> = <Popen: returncode: 0 args: [PosixPath('/tmp/pytest-of-runner/pytest-0/tt_bu...>.stdout
==== 1 failed, 535 passed, 159 skipped, 10 deselected in 3973.75s (1:06:13) ====
@themilchenko themilchenko added the flaky test The issue describes the problem with the test being flaky label Oct 9, 2024
dmyger added a commit that referenced this issue Oct 18, 2024
@dmyger dmyger linked a pull request Oct 18, 2024 that will close this issue
dmyger added a commit that referenced this issue Oct 19, 2024
dmyger added a commit that referenced this issue Oct 19, 2024
dmyger added a commit that referenced this issue Oct 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
1sp flaky test The issue describes the problem with the test being flaky teamE
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants