Skip to content

Commit 6a42ec5

Browse files
authored
Merge pull request ceph#54637 from yuvalif/wip-yuval-62136
rgw/test/kafka: let consumer read events from the beginning reviewed-by: thotz
2 parents 2c43e1d + 4f2ac20 commit 6a42ec5

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/test/rgw/bucket_notification/test_bn.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -434,7 +434,8 @@ def __init__(self, topic, security_type):
434434
self.consumer = KafkaConsumer(topic,
435435
bootstrap_servers = kafka_server+':'+str(port),
436436
security_protocol=security_type,
437-
consumer_timeout_ms=16000)
437+
consumer_timeout_ms=16000,
438+
auto_offset_reset='earliest')
438439
print('Kafka consumer created on topic: '+topic)
439440
break
440441
except Exception as error:
@@ -1534,8 +1535,8 @@ def test_ps_s3_notification_push_kafka_on_master():
15341535
time_diff = time.time() - start_time
15351536
print('average time for creation + kafka notification is: ' + str(time_diff*1000/number_of_objects) + ' milliseconds')
15361537

1537-
print('wait for 5sec for the messages...')
1538-
time.sleep(5)
1538+
print('wait for 10sec for the messages...')
1539+
time.sleep(10)
15391540
keys = list(bucket.list())
15401541
receiver.verify_s3_events(keys, exact_match=True, etags=etags)
15411542

@@ -1551,8 +1552,8 @@ def test_ps_s3_notification_push_kafka_on_master():
15511552
time_diff = time.time() - start_time
15521553
print('average time for deletion + kafka notification is: ' + str(time_diff*1000/number_of_objects) + ' milliseconds')
15531554

1554-
print('wait for 5sec for the messages...')
1555-
time.sleep(5)
1555+
print('wait for 10sec for the messages...')
1556+
time.sleep(10)
15561557
receiver.verify_s3_events(keys, exact_match=True, deletions=True, etags=etags)
15571558
except Exception as e:
15581559
assert False, str(e)

0 commit comments

Comments
 (0)