Skip to content

Commit

Permalink
daemonize the thread to see if the tests will continue
Browse files Browse the repository at this point in the history
  • Loading branch information
andymccurdy committed Jun 30, 2021
1 parent ed8c2df commit b25cc4e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/test_pubsub.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,12 @@
import pytest
import threading
import time

from unittest import mock

import pytest
import redis
from redis.exceptions import ConnectionError

from .conftest import _get_client
from .conftest import skip_if_server_version_lt
from .conftest import _get_client, skip_if_server_version_lt


def wait_for_message(pubsub, timeout=0.1, ignore_subscribe_messages=False):
Expand Down Expand Up @@ -561,6 +559,7 @@ def exception_handler(ex, pubsub, thread):
with mock.patch.object(p, 'get_message',
side_effect=Exception('error')):
pubsub_thread = p.run_in_thread(
daemon=True,
exception_handler=exception_handler
)

Expand Down

0 comments on commit b25cc4e

Please sign in to comment.