Documentation ¶
Index ¶
- func SpinWaitCondition(tb testing.TB, l sync.Locker, cond func() bool)
- func SpinWaitConditionWithTimeout(tb testing.TB, l sync.Locker, condWaitTimeout time.Duration, cond func() bool)
- func TestManyTimes(t testing.TB, test TestFunc, opts ...TestManyTimesOption)
- func TestManyTimesWithName(t *testing.T, name string, test TestFunc)
- func WaitChannelClosed(t testing.TB, ch empty.Chan)
- type GrpcLogger
- type TestFunc
- type TestManyTimesOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SpinWaitCondition ¶
SpinWaitCondition wait while cond return true with check it in loop l can be nil - then locker use for check conditions
func SpinWaitConditionWithTimeout ¶ added in v3.33.0
func SpinWaitConditionWithTimeout(tb testing.TB, l sync.Locker, condWaitTimeout time.Duration, cond func() bool)
SpinWaitConditionWithTimeout wait while cond return true with check it in loop l can be nil - then locker use for check conditions
func TestManyTimes ¶
func TestManyTimes(t testing.TB, test TestFunc, opts ...TestManyTimesOption)
Types ¶
type GrpcLogger ¶ added in v3.37.4
type GrpcLogger struct {
// contains filtered or unexported fields
}
GrpcLogger use for log raw grpc messages
Usage:
db, err := ydb.Open(context.Background(), connectionString, ... ydb.With(config.WithGrpcOptions(grpc.WithChainUnaryInterceptor(xtest.NewGrpcLogger(t).UnaryClientInterceptor))), )
func NewGrpcLogger ¶ added in v3.37.4
func NewGrpcLogger(t testing.TB) GrpcLogger
func (GrpcLogger) StreamClientInterceptor ¶ added in v3.37.4
func (l GrpcLogger) StreamClientInterceptor( ctx context.Context, desc *grpc.StreamDesc, cc *grpc.ClientConn, method string, streamer grpc.Streamer, opts ...grpc.CallOption, ) (grpc.ClientStream, error)
func (GrpcLogger) UnaryClientInterceptor ¶ added in v3.37.4
func (l GrpcLogger) UnaryClientInterceptor( ctx context.Context, method string, req, reply interface{}, cc *grpc.ClientConn, invoker grpc.UnaryInvoker, opts ...grpc.CallOption, ) error
type TestManyTimesOption ¶ added in v3.32.0
type TestManyTimesOption func(opts *testManyTimesOptions)
func StopAfter ¶ added in v3.33.0
func StopAfter(stopAfter time.Duration) TestManyTimesOption
Click to show internal directories.
Click to hide internal directories.