tabletconntest

package
v2.0.0-alpha3+incompat... Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2015 License: BSD-3-Clause Imports: 16 Imported by: 0

Documentation

Overview

Package tabletconntest provides the test methods to make sure a tabletconn/queryservice pair over RPC works correctly.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func TestErrorSuite

func TestErrorSuite(t *testing.T, protocol string, endPoint *pbt.EndPoint, fake *FakeQueryService)

TestErrorSuite runs all the tests that expect errors

func TestSuite

func TestSuite(t *testing.T, protocol string, endPoint *pbt.EndPoint, fake *FakeQueryService)

TestSuite runs all the tests

Types

type FakeQueryService

type FakeQueryService struct {
	// contains filtered or unexported fields
}

FakeQueryService has the server side of this fake

func CreateFakeServer

func CreateFakeServer(t *testing.T) *FakeQueryService

CreateFakeServer returns the fake server for the tests

func (*FakeQueryService) Begin

func (f *FakeQueryService) Begin(ctx context.Context, target *pb.Target, session *proto.Session, txInfo *proto.TransactionInfo) error

Begin is part of the queryservice.QueryService interface

func (*FakeQueryService) Commit

func (f *FakeQueryService) Commit(ctx context.Context, target *pb.Target, session *proto.Session) error

Commit is part of the queryservice.QueryService interface

func (*FakeQueryService) Execute

func (f *FakeQueryService) Execute(ctx context.Context, target *pb.Target, query *proto.Query, reply *mproto.QueryResult) error

Execute is part of the queryservice.QueryService interface

func (*FakeQueryService) ExecuteBatch

func (f *FakeQueryService) ExecuteBatch(ctx context.Context, target *pb.Target, queryList *proto.QueryList, reply *proto.QueryResultList) error

ExecuteBatch is part of the queryservice.QueryService interface

func (*FakeQueryService) GetSessionId

func (f *FakeQueryService) GetSessionId(sessionParams *proto.SessionParams, sessionInfo *proto.SessionInfo) error

GetSessionId is part of the queryservice.QueryService interface

func (*FakeQueryService) HandlePanic

func (f *FakeQueryService) HandlePanic(err *error)

HandlePanic is part of the queryservice.QueryService interface

func (*FakeQueryService) Rollback

func (f *FakeQueryService) Rollback(ctx context.Context, target *pb.Target, session *proto.Session) error

Rollback is part of the queryservice.QueryService interface

func (*FakeQueryService) SplitQuery

func (f *FakeQueryService) SplitQuery(ctx context.Context, target *pb.Target, req *proto.SplitQueryRequest, reply *proto.SplitQueryResult) error

SplitQuery is part of the queryservice.QueryService interface

func (*FakeQueryService) StreamExecute

func (f *FakeQueryService) StreamExecute(ctx context.Context, target *pb.Target, query *proto.Query, sendReply func(*mproto.QueryResult) error) error

StreamExecute is part of the queryservice.QueryService interface

func (*FakeQueryService) StreamHealthRegister

func (f *FakeQueryService) StreamHealthRegister(c chan<- *pb.StreamHealthResponse) (int, error)

StreamHealthRegister is part of the queryservice.QueryService interface

func (*FakeQueryService) StreamHealthUnregister

func (f *FakeQueryService) StreamHealthUnregister(int) error

StreamHealthUnregister is part of the queryservice.QueryService interface

Jump to

Keyboard shortcuts

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