Skip to content

Commit

Permalink
rptest: Usage pass when reported cloud usage seen
Browse files Browse the repository at this point in the history
(cherry picked from commit 0879019)
  • Loading branch information
graphcareful authored and vbotbuildovich committed Apr 11, 2023
1 parent 9c1ec67 commit f29a054
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 @@ -281,15 +281,16 @@ def check_usage():
manifest_usage = self.admin.cloud_storage_usage()
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 f29a054

Please sign in to comment.