Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: odubajDT <ondrej.dubaj@dynatrace.com>
  • Loading branch information
odubajDT committed Jul 23, 2024
1 parent e21d7f4 commit 8544d62
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions receiver/chronyreceiver/internal/chrony/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ func (c *client) getContext(ctx context.Context) (context.Context, context.Cance
if c.timeout == 0 {
return context.WithCancel(ctx)
}
clock := clockwork.FromContext(ctx)
clock.After(c.timeout)
newCtx := clockwork.AddToContext(ctx, clock)
return context.WithCancel(newCtx)

return context.WithTimeout(ctx, c.timeout)
}

0 comments on commit 8544d62

Please sign in to comment.