Skip to content

Commit

Permalink
fix: Prevent invalid negative timestamps getting container logs (test…
Browse files Browse the repository at this point in the history
  • Loading branch information
mausch committed Oct 31, 2023
1 parent 082eea4 commit ce5964f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Testcontainers/Clients/DockerContainerOperations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ public async Task<long> GetExitCodeAsync(string id, CancellationToken ct = defau
{
ShowStdout = true,
ShowStderr = true,
Since = since.TotalSeconds.ToString("0", CultureInfo.InvariantCulture),
Until = until.TotalSeconds.ToString("0", CultureInfo.InvariantCulture),
Since = Math.Max(0, since.TotalSeconds).ToString("0", CultureInfo.InvariantCulture),
Until = Math.Max(0, until.TotalSeconds).ToString("0", CultureInfo.InvariantCulture),
Timestamps = timestampsEnabled,
};

Expand Down

0 comments on commit ce5964f

Please sign in to comment.