Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
seba-aln committed Apr 9, 2024
1 parent 62b0e46 commit aa5610b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
1 change: 0 additions & 1 deletion pubnub/pubnub_asyncio.py
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,6 @@ def __init__(self):
self.error_queue = Queue()

def status(self, pubnub, status):
# DEBUG print(f"\033[92m\n\nstatus:\n{status.__dict__}\n\n\033[0m")
if utils.is_subscribed_event(status) and not self.connected_event.is_set():
self.connected_event.set()
elif utils.is_unsubscribed_event(status) and not self.disconnected_event.is_set():
Expand Down
17 changes: 9 additions & 8 deletions tests/integrational/asyncio/test_heartbeat.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,23 @@
import pubnub as pn
from pubnub.pubnub_asyncio import AsyncioSubscriptionManager, PubNubAsyncio, SubscribeListener
from tests import helper
from tests.helper import pnconf_env_copy
from tests.helper import pnconf_sub_copy

pn.set_stream_logger('pubnub', logging.DEBUG)


messenger_config = pnconf_sub_copy()
messenger_config.set_presence_timeout(8)
messenger_config.uuid = helper.gen_channel("messenger")

listener_config = pnconf_sub_copy()
listener_config.uuid = helper.gen_channel("listener")


@pytest.mark.asyncio
async def test_timeout_event_on_broken_heartbeat(event_loop):
ch = helper.gen_channel("heartbeat-test")

messenger_config = pnconf_env_copy(uuid=helper.gen_channel('messenger'), enable_subscribe=True,
suppress_leave_events=True)
messenger_config.set_presence_timeout(8)

listener_config = pnconf_env_copy(uuid=helper.gen_channel('messenger'), enable_subscribe=True,
suppress_leave_events=True)

pubnub = PubNubAsyncio(messenger_config, custom_event_loop=event_loop)
pubnub_listener = PubNubAsyncio(listener_config, custom_event_loop=event_loop)

Expand Down
2 changes: 1 addition & 1 deletion tests/integrational/native_threads/test_subscribe.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class TestPubNubSubscription(unittest.TestCase):
filter_query_parameters=['seqn', 'pnsdk', 'tr', 'tt'], serializer='pn_json',
allow_playback_repeats=True)
def test_subscribe_unsubscribe(self):
pubnub = PubNub(pnconf_env_copy(enable_subscribe=True, daemon=True, suppress_leave_events=True))
pubnub = PubNub(pnconf_env_copy(enable_subscribe=True, daemon=True))
ch = "test-subscribe-sub-unsub"

try:
Expand Down

0 comments on commit aa5610b

Please sign in to comment.