Skip to content

Commit

Permalink
fix(core): Don't call "logs" twice in wait_for_logs
Browse files Browse the repository at this point in the history
  • Loading branch information
mschmitzer committed Oct 17, 2024
1 parent 08bf23f commit e2631d5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions core/testcontainers/core/waiting_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,9 @@ def wait_for_logs(
start = time.time()
while True:
duration = time.time() - start
stdout = container.get_logs()[0].decode()
stderr = container.get_logs()[1].decode()
stdout, stderr = container.get_logs()
stdout = stdout.decode()
stderr = stderr.decode()
predicate_result = (
predicate(stdout) or predicate(stderr)
if predicate_streams_and is False
Expand Down

0 comments on commit e2631d5

Please sign in to comment.