This commit is contained in:
@@ -346,6 +346,24 @@ func TestQualificationLossOnlyDoesNotImplicitlyReorder(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestQualificationSourceShaperCarriesAtMostOnePacketOfCatchup(t *testing.T) {
|
||||
spacing := time.Millisecond
|
||||
started := time.Unix(0, 0)
|
||||
now := started.Add(100 * spacing)
|
||||
first := qualificationBoundedRelease(started, time.Time{}, now, spacing)
|
||||
if first != now.Add(-spacing) {
|
||||
t.Fatalf("first catch-up release = %s, want %s", first, now.Add(-spacing))
|
||||
}
|
||||
second := qualificationBoundedRelease(started.Add(spacing), first.Add(spacing), now, spacing)
|
||||
if second != now {
|
||||
t.Fatalf("second catch-up release = %s, want %s", second, now)
|
||||
}
|
||||
third := qualificationBoundedRelease(started.Add(2*spacing), second.Add(spacing), now, spacing)
|
||||
if third != now.Add(spacing) {
|
||||
t.Fatalf("catch-up debt was reset: third release = %s, want %s", third, now.Add(spacing))
|
||||
}
|
||||
}
|
||||
|
||||
func TestQualificationExplicitReorderIsBoundedAndAttributed(t *testing.T) {
|
||||
observation, err := runQualificationImpairment(
|
||||
t,
|
||||
|
||||
Reference in New Issue
Block a user