Skip to content

Commit 5b44544

Browse files
authored
Reintroduce hanging dagit test (#29165)
1 parent 596de53 commit 5b44544

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

python_modules/dagit/dagit_tests/test_cli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
import subprocess
33
import time
44

5-
import pytest
65
from dagster import asset
76

87

@@ -21,15 +20,16 @@ def foo(bar):
2120
return 1
2221

2322

24-
@pytest.mark.skip("This test is hanging indefinitely")
2523
def test_cli_logs_to_dagit():
2624
defs_path = os.path.realpath(__file__)
2725
process = subprocess.Popen(
2826
["dagit", "-f", defs_path], stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True
2927
)
3028
time.sleep(2) # give time for dagit to start
3129
process.terminate()
32-
process.wait()
33-
stdout, _ = process.communicate()
34-
assert "The `dagit` CLI command is deprecated" in stdout
35-
assert "- dagit -" in stdout
30+
try:
31+
stdout, _ = process.communicate(timeout=10)
32+
assert "The `dagit` CLI command is deprecated" in stdout
33+
assert "- dagit -" in stdout
34+
except subprocess.TimeoutExpired:
35+
process.kill()

0 commit comments

Comments
 (0)