throttlerclienttest

package
v2.0.0+incompatible Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 12, 2016 License: BSD-3-Clause Imports: 6 Imported by: 0

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL