tarantool / tarantool/tt

tests: log_dir_removed_after_follow flacky test

Open
#975 0 comments 0 reactions 1 assignee View on GitHub

@dmyger is already working on this.

Since Oct 16, 2024.

1sp flaky test teamE
Dominant language
Go
Stars
113
Forks
18
Avg merge
4d 11h
Merged PRs (30d)
23

Description

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) ====

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.