Skip to content

Commit f2d76aa

Browse files
author
Sebastian Molenda
committed
missing required package
1 parent d853b9e commit f2d76aa

File tree

3 files changed

+6
-2
lines changed

3 files changed

+6
-2
lines changed

pubnub/event_engine/effects.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,12 +218,15 @@ async def delayed_reconnect_async(self, delay, attempt):
218218
elif response.status.error:
219219
self.logger.warning(f'Reconnect failed: {response.status.error_data.__dict__}')
220220
self.failure(response.status.error_data, attempt, self.get_timetoken())
221-
else:
221+
elif 't' in response.result:
222222
cursor = response.result['t']
223223
timetoken = int(self.invocation.timetoken) if self.invocation.timetoken else cursor['t']
224224
region = cursor['r']
225225
messages = response.result['m']
226226
self.success(timetoken=timetoken, region=region, messages=messages)
227+
else:
228+
self.logger.warning(f'Reconnect failed: Invalid response {str(response)}')
229+
self.failure(str(response), attempt, self.get_timetoken())
227230

228231
def stop(self):
229232
self.logger.debug(f'stop called on {self.__class__.__name__}')

requirements-dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ flake8
55
pytest
66
pytest-asyncio
77
httpx
8+
h2
89
requests
910
aiohttp
1011
cbor2

tests/acceptance/subscribe/steps/then_steps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ async def step_impl(ctx):
125125
@async_run_until_complete
126126
async def step_impl(context, channel1, channel2):
127127
context.pubnub.unsubscribe().channels([channel1, channel2]).execute()
128-
await asyncio.sleep(0.5)
128+
await asyncio.sleep(3)
129129

130130

131131
@then(u'I don\'t observe any Events and Invocations of the Presence EE')

0 commit comments

Comments
 (0)