Skip to content

Commit 1dace26

Browse files
committed
draft wait(10 sec) to end process
1 parent 7118685 commit 1dace26

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

test/integration/log/test_log.py

+8-8
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_log_output_default_run(tt_cmd, mock_env_dir):
4343
expecting_lines.append(f"app1:inst{inst_n}: line {i}")
4444
with ProcessTextPipe((tt_cmd, "log"), mock_env_dir) as process:
4545
output = pipe_wait_all(process, expecting_lines)
46-
assert process.wait(2) == 0, "Exit status not a success"
46+
assert process.wait(10) == 0, "Exit status not a success"
4747

4848
assert "app0:inst3" not in output
4949
assert "app1:inst3" not in output
@@ -57,7 +57,7 @@ def test_log_limit_lines_count(tt_cmd, mock_env_dir):
5757
expecting_lines.append(f"app1:inst{inst_n}: line {i}")
5858
with ProcessTextPipe((tt_cmd, "log", "-n", "3"), mock_env_dir) as process:
5959
pipe_wait_all(process, expecting_lines)
60-
assert process.wait(2) == 0, "Exit status not a success"
60+
assert process.wait(10) == 0, "Exit status not a success"
6161

6262

6363
def test_log_more_lines(tt_cmd, mock_env_dir):
@@ -69,7 +69,7 @@ def test_log_more_lines(tt_cmd, mock_env_dir):
6969

7070
with ProcessTextPipe((tt_cmd, "log", "-n", "300"), mock_env_dir) as process:
7171
pipe_wait_all(process, expecting_lines)
72-
assert process.wait(2) == 0, "Exit status not a success"
72+
assert process.wait(10) == 0, "Exit status not a success"
7373

7474

7575
def test_log_want_zero(tt_cmd, mock_env_dir):
@@ -91,7 +91,7 @@ def test_log_specific_instance(tt_cmd, mock_env_dir):
9191
assert "app0:inst0" not in output
9292
assert "app0:inst2" not in output
9393
assert "app1" not in output
94-
assert process.wait(2) == 0, "Exit status not a success"
94+
assert process.wait(10) == 0, "Exit status not a success"
9595

9696

9797
def test_log_specific_app(tt_cmd, mock_env_dir):
@@ -103,13 +103,13 @@ def test_log_specific_app(tt_cmd, mock_env_dir):
103103
with ProcessTextPipe((tt_cmd, "log", "app1"), mock_env_dir) as process:
104104
output = pipe_wait_all(process, expecting_lines)
105105
assert "app0" not in output
106-
assert process.wait(2) == 0, "Exit status not a success"
106+
assert process.wait(10) == 0, "Exit status not a success"
107107

108108

109109
def test_log_negative_lines_num(tt_cmd, mock_env_dir):
110110
with ProcessTextPipe((tt_cmd, "log", "-n", "-10"), mock_env_dir) as process:
111111
pipe_wait_all(process, "negative")
112-
assert process.wait(2) != 0, "Exit status should be error code"
112+
assert process.wait(10) != 0, "Exit status should be error code"
113113

114114

115115
def test_log_no_app(tt_cmd, mock_env_dir):
@@ -180,7 +180,7 @@ def test_log_dir_removed_after_follow(tt_cmd, mock_env_dir: Path):
180180
shutil.rmtree(dir)
181181

182182
pipe_wait_all(process, "Failed to detect creation of", timeout=2)
183-
assert process.wait(2) == 0, "Exit status not a success"
183+
assert process.wait(10) == 0, "Exit status not a success"
184184

185185

186186
# There are two apps in this test: app0 and app1. After removing app0 dirs,
@@ -209,4 +209,4 @@ def test_log_dir_partially_removed_after_follow(tt_cmd, mock_env_dir: Path):
209209
shutil.rmtree(dir)
210210

211211
pipe_wait_all(process, "Failed to detect creation of")
212-
assert process.wait(2) == 0, "Exit status not a success"
212+
assert process.wait(10) == 0, "Exit status not a success"

0 commit comments

Comments
 (0)