We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6193268 commit 0b526a5Copy full SHA for 0b526a5
1 file changed
tests/hooks/test_git_hook.py
@@ -1,9 +1,9 @@
1
"""Unit test module for DbtGitFSHook."""
2
3
-import multiprocessing
4
import os
5
import platform
6
import shutil
+import threading
7
import typing
8
9
import pytest
@@ -343,14 +343,15 @@ def git_server(repo, repo_name):
343
backend = DictBackend({repo_name.encode(): repo})
344
dul_server = TCPGitServer(backend, b"localhost", 0)
345
346
- proc = multiprocessing.Process(target=dul_server.serve)
347
- proc.start()
+ server_thread = threading.Thread(target=dul_server.serve)
+ server_thread.start()
348
349
server_address, server_port = dul_server.socket.getsockname()
350
351
yield server_address, server_port
352
353
- proc.terminate()
+ dul_server.shutdown()
354
+ server_thread.join()
355
356
357
@no_git_local_server
0 commit comments