Documentation ¶
Index ¶
- Constants
- Variables
- func BenchExecutor(sm ServerMaker) func(t *testing.B, c BenchContext)
- func NewRouter() *jmux2.Mux
- func NewRouterWithMaxSize(size int) *jmux2.Mux
- func NewServer() *server.Server
- func RunBasicTestSuite(t *testing.T, args BasicTestSuiteArgs)
- func TestExecutor(sm ServerMaker) func(t *testing.T, c TestContext)
- type BasicTestSuiteArgs
- type BenchContext
- type ClientMaker
- type EchoArgs
- type EchoResult
- type FlakeyListener
- type LargeRespService
- type ServerMaker
- type TestAction
- type TestContext
- type TestData
- type TestDirection
- type TestFile
Constants ¶
View Source
const ( DirectionSend = TestDirection("send") DirectionRecv = TestDirection("recv") )
Variables ¶
View Source
var OriginalTestData = &TestData{}
Functions ¶
func BenchExecutor ¶
func BenchExecutor(sm ServerMaker) func(t *testing.B, c BenchContext)
func NewRouterWithMaxSize ¶
func RunBasicTestSuite ¶
func RunBasicTestSuite(t *testing.T, args BasicTestSuiteArgs)
func TestExecutor ¶
func TestExecutor(sm ServerMaker) func(t *testing.T, c TestContext)
Types ¶
type BasicTestSuiteArgs ¶
type BasicTestSuiteArgs struct {
ServerMaker ServerMaker
}
type BenchContext ¶
type ClientMaker ¶
type EchoResult ¶
type FlakeyListener ¶
flakeyListener kills accepted connections after a random timeout.
type LargeRespService ¶
type LargeRespService struct {
Length int
}
largeRespService generates arbitrary-size JSON responses.
func (LargeRespService) LargeResp ¶
func (x LargeRespService) LargeResp() string
type ServerMaker ¶
type ServerMaker func() (*server.Server, ClientMaker, func())
type TestAction ¶
type TestAction struct { Direction TestDirection Data json.RawMessage }
type TestDirection ¶
type TestDirection string
type TestFile ¶
type TestFile struct { Name string Action []*TestAction }
Click to show internal directories.
Click to hide internal directories.