Skip to content

Commit

Permalink
rptest: Usage pass when reported cloud usage seen
Browse files Browse the repository at this point in the history
  • Loading branch information
graphcareful committed Apr 10, 2023
1 parent 9ded5ed commit 0879019
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/rptest/tests/usage_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,15 +285,16 @@ def check_usage():
manifest_usage = bucket_view.total_cloud_log_size()
reported_usage = self.admin.get_usage(
random.choice(self.redpanda.nodes))
reported_usage = max(
[x['cloud_storage_bytes_gauge'] for x in reported_usage])
reported_usages = [
x['cloud_storage_bytes_gauge'] for x in reported_usage
]

self.logger.info(
f"Expected {manifest_usage} bytes of cloud storage usage")
self.logger.info(
f"Max reported usages via kafka/usage_manager: {reported_usage}"
f"Max reported usages via kafka/usage_manager: {max(reported_usages)}"
)
return reported_usage == manifest_usage
return manifest_usage in reported_usages

wait_until(
check_usage,
Expand Down

0 comments on commit 0879019

Please sign in to comment.