Skip to content

Commit 656d422

Browse files
royitaqigithub-actions[bot]
authored andcommitted
Automerge: [lldb-dap] Fix test: TestDAP_server.py (#157924)
See llvm/llvm-project#156803 (comment) for full context. Summary: * In llvm/llvm-project#156803, we see a builtbot failure for `TestDAP_server.py` on Debian. Note that macOS and other Linux distributions (like CentOS, or whatever Linux the [required buildbot](https://github.com/llvm/llvm-project/actions/runs/17594257911/job/49982560193#logs) uses) seem to pass the tests. * In the 3 newly added tests, the most complex test case passed, while the other easier ones failed. ``` PASS: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_multiple_sessions (TestDAP_server.TestDAP_server.test_connection_timeout_multiple_sessions) FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_long_debug_session (TestDAP_server.TestDAP_server.test_connection_timeout_long_debug_session) FAIL: LLDB (/home/worker/2.0.1/lldb-x86_64-debian/build/bin/clang-x86_64) :: test_connection_timeout_at_server_start (TestDAP_server.TestDAP_server.test_connection_timeout_at_server_start) ``` * The error is that `process.wait(timeout)` timed out during the teardown of the tests. * The above suggests that maybe the root cause is that the timeout is set too strictly (and that maybe the server termination on Debian is slower than the other Linux distribution for some reason). * This patch loosens that timeout from 2s to 5s. Let's see if this works. * FWIW, I cannot verify the root cause, because I don't have a Debian machine.
2 parents 1785f2a + 11a4f5b commit 656d422

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lldb/test/API/tools/lldb-dap/server/TestDAP_server.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ def test_connection_timeout_at_server_start(self):
127127
self.start_server(
128128
connection="listen://localhost:0",
129129
connection_timeout=1,
130-
wait_seconds_for_termination=2,
130+
wait_seconds_for_termination=5,
131131
)
132132

133133
@skipIfWindows
@@ -139,7 +139,7 @@ def test_connection_timeout_long_debug_session(self):
139139
(_, connection) = self.start_server(
140140
connection="listen://localhost:0",
141141
connection_timeout=1,
142-
wait_seconds_for_termination=2,
142+
wait_seconds_for_termination=5,
143143
)
144144
# The connection timeout should not cut off the debug session
145145
self.run_debug_session(connection, "Alice", 1.5)
@@ -153,7 +153,7 @@ def test_connection_timeout_multiple_sessions(self):
153153
(_, connection) = self.start_server(
154154
connection="listen://localhost:0",
155155
connection_timeout=1,
156-
wait_seconds_for_termination=2,
156+
wait_seconds_for_termination=5,
157157
)
158158
time.sleep(0.5)
159159
# Should be able to connect to the server.

0 commit comments

Comments
 (0)