Skip to content

Commit daf9433

Browse files
committed
Extend timeout for test_venv
1 parent d8a6b9b commit daf9433

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

graalpython/com.oracle.graal.python.test/src/runner.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -701,7 +701,7 @@ def run_in_subprocess_and_watch(self):
701701
popen_kwargs.update(pass_fds=[child_pipe.fileno()])
702702
self.process = subprocess.Popen(cmd, **popen_kwargs)
703703

704-
timed_out = False
704+
timed_out = None
705705

706706
if use_pipe:
707707
while self.process.poll() is None:
@@ -718,7 +718,7 @@ def run_in_subprocess_and_watch(self):
718718

719719
if time.time() - self.last_started_time >= timeout:
720720
interrupt_process(self.process)
721-
timed_out = True
721+
timed_out = timeout
722722
# Drain the pipe
723723
while pipe.poll(0.1):
724724
pipe.recv()
@@ -741,11 +741,11 @@ def run_in_subprocess_and_watch(self):
741741
for file_event in pickle.load(f):
742742
self.process_event(file_event)
743743

744-
if returncode != 0 or timed_out:
744+
if returncode != 0 or timed_out is not None:
745745
self.out_file.seek(self.last_out_pos)
746746
output = self.out_file.read()
747-
if timed_out:
748-
message = "Timed out"
747+
if timed_out is not None:
748+
message = f"Timed out in {timed_out}s"
749749
elif returncode >= 0:
750750
message = f"Test process exitted with code {returncode}"
751751
else:

graalpython/com.oracle.graal.python.test/src/tests/conftest.toml

+7
Original file line numberDiff line numberDiff line change
@@ -64,3 +64,10 @@ selector = [
6464
# These test would work on JVM too, but they are prohibitively slow due to a large amount of subprocesses
6565
"test_patched_pip.py",
6666
]
67+
68+
[[test_rules]]
69+
per_test_timeout = 1200
70+
selector = [
71+
"test_venv.py",
72+
"test_patched_pip.py",
73+
]

0 commit comments

Comments
 (0)