Skip to content

Commit 63e3cf1

Browse files
author
Sebastian Molenda
committed
Debug...
1 parent f2d76aa commit 63e3cf1

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/acceptance/subscribe/environment.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
11
import asyncio
22
import requests
3+
import logging
34

45
from behave.runner import Context
56
from io import StringIO
7+
from httpx import HTTPError
68
from pubnub.pubnub import PubNub
79
from pubnub.pnconfiguration import PNConfiguration
810
from pubnub.pubnub_asyncio import SubscribeCallback
@@ -51,6 +53,10 @@ def after_scenario(context: Context, feature):
5153
loop.run_until_complete(task)
5254
except asyncio.CancelledError:
5355
pass
56+
except HTTPError as e:
57+
logger = logging.getLogger("pubnub")
58+
logger.error(f"HTTPError: {e}")
59+
5460
loop.run_until_complete(asyncio.sleep(1.5))
5561
del context.pubnub
5662

0 commit comments

Comments
 (0)