Documentation ¶
Index ¶
- func AllowByFlag(t testing.TB, flag string)
- func Context(t testing.TB) context.Context
- 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 <-chan struct{})
- func WaitChannelClosedWithTimeout(t testing.TB, ch <-chan struct{}, timeout time.Duration)
- func WaitGroup(tb testing.TB, wg *sync.WaitGroup)
- func WaitGroupWithTimeout(tb testing.TB, wg *sync.WaitGroup, timeout time.Duration)
- type GrpcLogger
- type SyncedTest
- func (s *SyncedTest) Cleanup(f func())
- func (s *SyncedTest) Error(args ...interface{})
- func (s *SyncedTest) Errorf(format string, args ...interface{})
- func (s *SyncedTest) Fail()
- func (s *SyncedTest) FailNow()
- func (s *SyncedTest) Failed() bool
- func (s *SyncedTest) Fatal(args ...interface{})
- func (s *SyncedTest) Fatalf(format string, args ...interface{})
- func (s *SyncedTest) Log(args ...interface{})
- func (s *SyncedTest) Logf(format string, args ...interface{})
- func (s *SyncedTest) Name() string
- func (s *SyncedTest) Setenv(key, value string)
- func (s *SyncedTest) Skip(args ...interface{})
- func (s *SyncedTest) SkipNow()
- func (s *SyncedTest) Skipf(format string, args ...interface{})
- func (s *SyncedTest) Skipped() bool
- func (s *SyncedTest) TempDir() string
- type TestFunc
- type TestManyTimesOption
- type TestWriter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllowByFlag ¶ added in v3.37.8
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)
func WaitChannelClosed ¶
func WaitChannelClosedWithTimeout ¶ added in v3.42.6
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 SyncedTest ¶ added in v3.38.0
func MakeSyncedTest ¶ added in v3.38.0
func MakeSyncedTest(t testing.TB) *SyncedTest
func (*SyncedTest) Cleanup ¶ added in v3.38.0
func (s *SyncedTest) Cleanup(f func())
func (*SyncedTest) Error ¶ added in v3.38.0
func (s *SyncedTest) Error(args ...interface{})
func (*SyncedTest) Errorf ¶ added in v3.38.0
func (s *SyncedTest) Errorf(format string, args ...interface{})
func (*SyncedTest) Fail ¶ added in v3.38.0
func (s *SyncedTest) Fail()
func (*SyncedTest) FailNow ¶ added in v3.38.0
func (s *SyncedTest) FailNow()
func (*SyncedTest) Failed ¶ added in v3.38.0
func (s *SyncedTest) Failed() bool
func (*SyncedTest) Fatal ¶ added in v3.38.0
func (s *SyncedTest) Fatal(args ...interface{})
func (*SyncedTest) Fatalf ¶ added in v3.38.0
func (s *SyncedTest) Fatalf(format string, args ...interface{})
func (*SyncedTest) Log ¶ added in v3.38.0
func (s *SyncedTest) Log(args ...interface{})
func (*SyncedTest) Logf ¶ added in v3.38.0
func (s *SyncedTest) Logf(format string, args ...interface{})
func (*SyncedTest) Name ¶ added in v3.38.0
func (s *SyncedTest) Name() string
func (*SyncedTest) Setenv ¶ added in v3.38.0
func (s *SyncedTest) Setenv(key, value string)
func (*SyncedTest) Skip ¶ added in v3.38.0
func (s *SyncedTest) Skip(args ...interface{})
func (*SyncedTest) SkipNow ¶ added in v3.38.0
func (s *SyncedTest) SkipNow()
func (*SyncedTest) Skipf ¶ added in v3.38.0
func (s *SyncedTest) Skipf(format string, args ...interface{})
func (*SyncedTest) Skipped ¶ added in v3.38.0
func (s *SyncedTest) Skipped() bool
func (*SyncedTest) TempDir ¶ added in v3.38.0
func (s *SyncedTest) TempDir() string
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
type TestWriter ¶ added in v3.38.0
Click to show internal directories.
Click to hide internal directories.