Skip to content

Commit

Permalink
Merge pull request ceph#39461 from yuvalif/wip-yuval-fix-49261
Browse files Browse the repository at this point in the history
rgw/test: allow for duplicate events in pubsub

Reviewed-by: Casey Bodley <[email protected]>
  • Loading branch information
cbodley authored Feb 15, 2021
2 parents 7f8bba5 + a695cf7 commit 533ecb1
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/test/rgw/rgw_multi/tests_ps.py
Original file line number Diff line number Diff line change
Expand Up @@ -3053,17 +3053,19 @@ def test_ps_admin():
+ ps_zone.zone.zone_arg())
assert_equal(status, 0)
parsed_result = json.loads(result)
assert_equal(len(parsed_result['events']), 100)
marker = parsed_result['next_marker']
events1 = parsed_result['events']
result, status = ps_zone.zone.cluster.admin(['subscription', 'pull', '--uid', get_user(), '--subscription', bucket_name+SUB_SUFFIX, '--marker', marker]
+ ps_zone.zone.zone_arg())
assert_equal(status, 0)
parsed_result = json.loads(result)
assert_equal(len(parsed_result['events']), 10)
event_id = parsed_result['events'][0]['id']
events2 = parsed_result['events']

keys = list(bucket.list())
verify_events_by_elements({"events": events1+events2}, keys, exact_match=False)

# ack an event in the subscription
result, status = ps_zone.zone.cluster.admin(['subscription', 'ack', '--uid', get_user(), '--subscription', bucket_name+SUB_SUFFIX, '--event-id', event_id]
result, status = ps_zone.zone.cluster.admin(['subscription', 'ack', '--uid', get_user(), '--subscription', bucket_name+SUB_SUFFIX, '--event-id', events2[0]['id']]
+ ps_zone.zone.zone_arg())
assert_equal(status, 0)

Expand Down

0 comments on commit 533ecb1

Please sign in to comment.