Atlas › Test
Test_OK_OK
Exact test identity: go.temporal.io/server/common/quotas/TestPriorityReservationSuite/Test_OK_OK
- Package
go.temporal.io/server/common/quotas
- Suite / test hierarchy
TestPriorityReservationSuite/Test_OK_OK
- Test
Test_OK_OK
- Introduced at
- Test_OK_OK, Test_NotOK_OK Frontier kind: Test frontier
- Covered ranges
- 6
- Covered lines
- 27
- Covered files
- 2
Co-introduced tests
1 other test enter at the same concept.
Covered source
Expand a file to inspect source; the > gutter marks covered lines.
go.temporal.io/server/common/quotas/reservation_mock.go 18 covered LOC · 4 ranges
Open complete file
30
31
// NewMockReservation creates a new mock instance.
33
>
mock := &MockReservation{ctrl: ctrl}
34
>
mock.recorder = &MockReservationMockRecorder{mock}
35
>
return mock
36
>
}
37
38
// EXPECT returns an object that allows the caller to indicate expected use.
40
>
return m.recorder
41
>
}
42
43
// Cancel mocks base method.
94
95
// OK mocks base method.
97
>
m.ctrl.T.Helper()
98
>
ret := m.ctrl.Call(m, "OK")
99
>
ret0, _ := ret[0].(bool)
100
>
return ret0
101
>
}
102
103
// OK indicates an expected call of OK.
105
>
mr.mock.ctrl.T.Helper()
106
>
return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "OK", reflect.TypeOf((*MockReservation)(nil).OK))
107
>
}
go.temporal.io/server/common/quotas/priority_reservation_impl.go 9 covered LOC · 2 ranges
Open complete file
17
decidingReservation Reservation,
18
otherReservations []Reservation,
20
>
return &PriorityReservationImpl{
21
>
decidingReservation: decidingReservation,
22
>
otherReservations: otherReservations,
23
>
}
24
>
}
25
26
// OK returns whether the limiter can provide the requested number of tokens
28
>
return r.decidingReservation.OK()
29
>
}
30
31
// Cancel indicates that the reservation holder will not perform the reserved action