Skip to content

Commit c42645c

Browse files
committed
Maybe fix http test when running on github
1 parent 64ccb59 commit c42645c

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/dsf/http.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,8 @@ def close(self):
140140
if self._loop is not None:
141141
# TODO: this enables correctly ending the loop. Why?
142142
self._loop.set_debug(True)
143-
self._server.close()
143+
if self._server is not None:
144+
self._server.close()
144145
self._loop.stop()
145146
self.event_loop.cancel()
146147
self.executor.shutdown(wait=False)

tests/test_custom_http_endpoint.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ def test_custom_http_endpoint(self):
8989
# Wait for mock DCS server to complete
9090
self.server_thread.join(timeout=1)
9191

92-
time.sleep(0.1)
92+
time.sleep(1)
9393

9494
if endpoint is not None:
9595
endpoint.close()

0 commit comments

Comments
 (0)