Skip to content

Commit 8c6f152

Browse files
committed
Added integration test for pause/resume
1 parent 1dd2e1e commit 8c6f152

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

examples/integration_test.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -447,6 +447,15 @@ def verify_consumer():
447447
(msg.topic(), msg.partition(), msg.offset(),
448448
msg.key(), msg.value(), tstype, timestamp))
449449

450+
if (msgcnt == 11):
451+
parts = c.assignment()
452+
print('Pausing partitions briefly')
453+
c.pause(parts)
454+
exp_None = c.poll(timeout=2.0)
455+
assert exp_None is None, "expected no messages during pause, got %s" % exp_None
456+
print('Resuming partitions')
457+
c.resume(parts)
458+
450459
if (msg.offset() % 5) == 0:
451460
# Async commit
452461
c.commit(msg, async=True)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy