go-vitess.v1: gopkg.in/src-d/go-vitess.v1/vt/throttler/throttlerclienttest Index | Files

package throttlerclienttest

import "gopkg.in/src-d/go-vitess.v1/vt/throttler/throttlerclienttest"

Package throttlerclienttest contains the testsuite against which each RPC implementation of the throttlerclient interface must be tested.

Index

Package Files

throttlerclient_testsuite.go

func TestSuite Uses

func TestSuite(t *testing.T, c throttlerclient.Client)

TestSuite runs the test suite on the given throttlerclient and throttlerserver.

func TestSuitePanics Uses

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.

type FakeManager Uses

type FakeManager struct {
}

FakeManager implements the throttler.Manager interface and panics on all methods defined in the interface.

func (*FakeManager) GetConfiguration Uses

func (fm *FakeManager) GetConfiguration(throttlerName string) (map[string]*throttlerdatapb.Configuration, error)

GetConfiguration implements the throttler.Manager interface. It always panics.

func (*FakeManager) MaxRates Uses

func (fm *FakeManager) MaxRates() map[string]int64

MaxRates implements the throttler.Manager interface. It always panics.

func (*FakeManager) ResetConfiguration Uses

func (fm *FakeManager) ResetConfiguration(throttlerName string) ([]string, error)

ResetConfiguration implements the throttler.Manager interface. It always panics.

func (*FakeManager) SetMaxRate Uses

func (fm *FakeManager) SetMaxRate(int64) []string

SetMaxRate implements the throttler.Manager interface. It always panics.

func (*FakeManager) UpdateConfiguration Uses

func (fm *FakeManager) UpdateConfiguration(throttlerName string, configuration *throttlerdatapb.Configuration, copyZeroValues bool) ([]string, error)

UpdateConfiguration implements the throttler.Manager interface. It always panics.

Package throttlerclienttest imports 8 packages (graph). Updated 2019-06-13. Refresh now. Tools for package owners.