Skip to content

Commit

Permalink
Improve cluster_id generation
Browse files Browse the repository at this point in the history
  • Loading branch information
jfmlima committed Jun 21, 2024
1 parent aa9a1ad commit 791d6e4
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/kafka/testcontainers/kafka/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ def with_cluster_id(self, cluster_id: str) -> Self:
def _random_uuid(cls):
uuid_value = uuid.uuid4()
uuid_bytes = uuid_value.bytes
base64_encoded_uuid = base64.b64encode(uuid_bytes)
base64_encoded_uuid = base64.urlsafe_b64encode(uuid_bytes)

return base64_encoded_uuid.decode()
return base64_encoded_uuid.decode().rstrip("=")

def configure(self):
if self.kraft_enabled:
Expand Down

0 comments on commit 791d6e4

Please sign in to comment.