Documentation
¶
Overview ¶
Package brokertest provides utilities for testing components requiring a live Gazette broker.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJournals ¶
func CreateJournals(t require.TestingT, bk *Broker, specs ...*pb.JournalSpec)
CreateJournals using the Broker Apply API, and wait for them to be allocated.
func Journal ¶
func Journal(spec pb.JournalSpec) *pb.JournalSpec
Journal returns |spec| after applying reasonable test defaults for fields which are not already set.
Types ¶
type Broker ¶
type Broker struct { ID pb.ProcessSpec_ID Authorizer pb.Authorizer Tasks *task.Group Server *server.Server // contains filtered or unexported fields }
Broker is a lightweight, embedded Gazette broker suitable for testing client functionality which depends on the availability of the Gazette service.
func NewBroker ¶
NewBroker builds and returns an in-process Broker identified by |zone| and |suffix|.
func NewBrokerWithKeys ¶ added in v0.100.0
func NewBrokerWithKeys(t require.TestingT, etcd *clientv3.Client, zone, suffix, encodedKeys string) *Broker
NewBroker builds and returns an in-process Broker identified by |zone| and |suffix|.
func (*Broker) Client ¶
func (b *Broker) Client() pb.RoutedJournalClient
Client returns a RoutedJournalClient wrapping the GRPCLoopback.