(t *testing.T)
| 1963 | } |
| 1964 | |
| 1965 | func TestIsSampleOld(t *testing.T) { |
| 1966 | currentTime := time.Now() |
| 1967 | require.True(t, isSampleOld(currentTime, 60*time.Second, timestamp.FromTime(currentTime.Add(-61*time.Second)))) |
| 1968 | require.False(t, isSampleOld(currentTime, 60*time.Second, timestamp.FromTime(currentTime.Add(-59*time.Second)))) |
| 1969 | } |
| 1970 | |
| 1971 | // Simulates scenario in which remote write endpoint is down and a subset of samples is dropped due to age limit while backoffing. |
| 1972 | func TestSendSamplesWithBackoffWithSampleAgeLimit(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…