Skip to content

Commit

Permalink
fix: Retrieve logs since CreatedTime for UntilMessageIsLogged wai…
Browse files Browse the repository at this point in the history
…t strategy (#1384)
  • Loading branch information
0xced authored Feb 28, 2025
1 parent 79ad7f9 commit fc47836
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@ public UntilMessageIsLogged(Regex pattern)

public async Task<bool> UntilAsync(IContainer container)
{
var (stdout, stderr) = await container.GetLogsAsync(since: container.StoppedTime, timestampsEnabled: false)
var maxTime = container.StoppedTime > container.CreatedTime ? container.StoppedTime : container.CreatedTime;
var (stdout, stderr) = await container.GetLogsAsync(since: maxTime, timestampsEnabled: false)
.ConfigureAwait(false);

return _pattern.IsMatch(stdout) || _pattern.IsMatch(stderr);
Expand Down

0 comments on commit fc47836

Please sign in to comment.