Documentation ¶
Overview ¶
Package throttlerclienttest contains the testsuite against which each RPC implementation of the throttlerclient interface must be tested.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestSuite ¶
func TestSuite(t *testing.T, c throttlerclient.Client)
TestSuite runs the test suite on the given throttlerclient and throttlerserver.
func TestSuitePanics ¶
func TestSuitePanics(t *testing.T, c throttlerclient.Client)
TestSuitePanics tests the panic handling of each RPC method. Unlike TestSuite it does not use the real throttler.managerImpl. Instead, it uses FakeManager which allows us to panic on each RPC.
Types ¶
type FakeManager ¶
type FakeManager struct { }
FakeManager implements the throttler.Manager interface and panics on all methods defined in the interface.
func (*FakeManager) MaxRates ¶
func (fm *FakeManager) MaxRates() map[string]int64
MaxRates implements the throttler.Manager interface. It always panics.
func (*FakeManager) SetMaxRate ¶
func (fm *FakeManager) SetMaxRate(int64) []string
SetMaxRate implements the throttler.Manager interface. It always panics.