Atlas › Test

Test_NotOK_OK

Exact test identity: go.temporal.io/server/common/quotas/TestMultiReservationSuite/Test_NotOK_OK

Package
go.temporal.io/server/common/quotas
Suite / test hierarchy
TestMultiReservationSuite/Test_NotOK_OK
Test
Test_NotOK_OK
Introduced at
Test_OK_OK, Test_NotOK_OK Frontier kind: Test frontier
Covered ranges
4
Covered lines
14
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/multi_reservation_impl.go 9 covered LOC · 3 ranges

Open complete file

17 ok bool,
18 reservations []Reservation,
19 > ) *MultiReservationImpl { multi_reservation_impl.go
20 > if ok && len(reservations) == 0 {
21 panic("expect at least one reservation")
22 }
23 > return &MultiReservationImpl{ multi_reservation_impl.go
24 > ok: ok,
25 > reservations: reservations,
26 > }
27 }
28
29 // OK returns whether the limiter can provide the requested number of tokens
30 > func (r *MultiReservationImpl) OK() bool { multi_reservation_impl.go
31 > return r.ok
32 > }
33
34 // Cancel indicates that the reservation holder will not perform the reserved action
go.temporal.io/server/common/quotas/reservation_mock.go 5 covered LOC · 1 range

Open complete file

30
31 // NewMockReservation creates a new mock instance.
32 > func NewMockReservation(ctrl *gomock.Controller) *MockReservation { reservation_mock.go
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.