use Prometheus' format for notification attempts durations (#56822)

This commit is contained in:
Santiago
2022-10-13 10:08:09 -03:00
committed by GitHub
parent 3c56fd8da0
commit 9996dbd577
4 changed files with 6 additions and 8 deletions

View File

@@ -857,8 +857,8 @@ func TestNotificationChannels(t *testing.T) {
// If the receiver is not active, no attempts to send notifications should be registered.
if expActive {
// Prometheus' durations get rounded down, so we might end up with "0s" if we have values smaller than 1ms.
require.NotZero(t, integration.LastNotifyAttempt)
require.NotEqual(t, "0s", integration.LastNotifyAttemptDuration)
} else {
require.Zero(t, integration.LastNotifyAttempt)
require.Equal(t, "0s", integration.LastNotifyAttemptDuration)