Skip to content

Commit b25cc4e

Browse files
committed
daemonize the thread to see if the tests will continue
1 parent ed8c2df commit b25cc4e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

tests/test_pubsub.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
1-
import pytest
21
import threading
32
import time
4-
53
from unittest import mock
64

5+
import pytest
76
import redis
87
from redis.exceptions import ConnectionError
98

10-
from .conftest import _get_client
11-
from .conftest import skip_if_server_version_lt
9+
from .conftest import _get_client, skip_if_server_version_lt
1210

1311

1412
def wait_for_message(pubsub, timeout=0.1, ignore_subscribe_messages=False):
@@ -561,6 +559,7 @@ def exception_handler(ex, pubsub, thread):
561559
with mock.patch.object(p, 'get_message',
562560
side_effect=Exception('error')):
563561
pubsub_thread = p.run_in_thread(
562+
daemon=True,
564563
exception_handler=exception_handler
565564
)
566565

0 commit comments

Comments
 (0)