Documentation ¶
Index ¶
- func DispatchBeforeTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func MakeMockJob(id string, name string) amboy.Job
- func ManyQueueTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func MergeQueueTestCases(ctx context.Context, cases ...[]QueueTestCase) <-chan QueueTestCase
- func MultiExecutionTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func NewMockJob() amboy.Job
- func NewSleepJob(dur time.Duration) amboy.Job
- func OneExecutionTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func OrderedTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func RandomID() string
- func RunGroupIntegrationTest(bctx context.Context, t *testing.T, group GroupIntegrationCase)
- func RunSerializationTest(ctx context.Context, t *testing.T, test QueueTestCase)
- func RunSmokeTest(bctx context.Context, t *testing.T, test QueueTestCase)
- func ScopedLockTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func UnorderedTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- func WaitUntilTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, ...)
- type CounterCache
- type Counters
- type GroupConstructor
- type GroupConstructorCase
- type GroupIntegrationCase
- type ManagerSuite
- func (s *ManagerSuite) SetupTest()
- func (s *ManagerSuite) TearDownTest()
- func (s *ManagerSuite) TestCompleteJob()
- func (s *ManagerSuite) TestCompleteJobsByTypeInvalidFilter()
- func (s *ManagerSuite) TestCompleteJobsByTypeValidFilter()
- func (s *ManagerSuite) TestCompleteJobsInvalidFilter()
- func (s *ManagerSuite) TestCompleteJobsValidFilter()
- func (s *ManagerSuite) TestErrorsWithInvalidFilter()
- func (s *ManagerSuite) TestJobCounterHighLevel()
- func (s *ManagerSuite) TestJobCountingIDHighLevel()
- func (s *ManagerSuite) TestJobStatusInvalidFilter()
- func (s *ManagerSuite) TestJobTiming()
- func (s *ManagerSuite) TestJobTimingMustBeLongerThanASecond()
- func (s *ManagerSuite) TestPruneCompletedJobs()
- func (s *ManagerSuite) TestPruneCompletedJobsWithLimit()
- func (s *ManagerSuite) TestPrunePending()
- func (s *ManagerSuite) TestRecentErrors()
- func (s *ManagerSuite) TestRecentJobErrors()
- func (s *ManagerSuite) TestTimingWithInvalidFilter()
- type PoolTestCase
- type QueueConstructor
- type QueueTestCase
- type SizeTestCase
- type TestCloser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DispatchBeforeTest ¶
func DispatchBeforeTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func ManyQueueTest ¶
func ManyQueueTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func MergeQueueTestCases ¶
func MergeQueueTestCases(ctx context.Context, cases ...[]QueueTestCase) <-chan QueueTestCase
func MultiExecutionTest ¶
func MultiExecutionTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func NewMockJob ¶
func OneExecutionTest ¶
func OneExecutionTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func OrderedTest ¶
func OrderedTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func RunGroupIntegrationTest ¶
func RunGroupIntegrationTest(bctx context.Context, t *testing.T, group GroupIntegrationCase)
func RunSerializationTest ¶
func RunSerializationTest(ctx context.Context, t *testing.T, test QueueTestCase)
func RunSmokeTest ¶
func RunSmokeTest(bctx context.Context, t *testing.T, test QueueTestCase)
func ScopedLockTest ¶
func ScopedLockTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func UnorderedTest ¶
func UnorderedTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
func WaitUntilTest ¶
func WaitUntilTest(bctx context.Context, t *testing.T, test QueueTestCase, runner PoolTestCase, size SizeTestCase)
Types ¶
type CounterCache ¶
func GetCounterCache ¶
func GetCounterCache() CounterCache
type GroupConstructor ¶
type GroupConstructor func(context.Context, time.Duration) (amboy.QueueGroup, TestCloser, error)
type GroupConstructorCase ¶
type GroupConstructorCase struct { Name string Valid bool LocalConstructor func(context.Context) (amboy.Queue, error) TTL time.Duration SkipRemote bool }
func DefaultGroupConstructorCases ¶
func DefaultGroupConstructorCases(localConstructor QueueConstructor) []GroupConstructorCase
type GroupIntegrationCase ¶
type GroupIntegrationCase struct { Name string Constructor GroupConstructor LocalConstructor QueueConstructor }
type ManagerSuite ¶
type ManagerSuite struct { Queue amboy.Queue Manager management.Manager Factory func() management.Manager Setup func() Cleanup func() error suite.Suite // contains filtered or unexported fields }
func (*ManagerSuite) SetupTest ¶
func (s *ManagerSuite) SetupTest()
func (*ManagerSuite) TearDownTest ¶
func (s *ManagerSuite) TearDownTest()
func (*ManagerSuite) TestCompleteJob ¶
func (s *ManagerSuite) TestCompleteJob()
func (*ManagerSuite) TestCompleteJobsByTypeInvalidFilter ¶
func (s *ManagerSuite) TestCompleteJobsByTypeInvalidFilter()
func (*ManagerSuite) TestCompleteJobsByTypeValidFilter ¶
func (s *ManagerSuite) TestCompleteJobsByTypeValidFilter()
func (*ManagerSuite) TestCompleteJobsInvalidFilter ¶
func (s *ManagerSuite) TestCompleteJobsInvalidFilter()
func (*ManagerSuite) TestCompleteJobsValidFilter ¶
func (s *ManagerSuite) TestCompleteJobsValidFilter()
func (*ManagerSuite) TestErrorsWithInvalidFilter ¶
func (s *ManagerSuite) TestErrorsWithInvalidFilter()
func (*ManagerSuite) TestJobCounterHighLevel ¶
func (s *ManagerSuite) TestJobCounterHighLevel()
func (*ManagerSuite) TestJobCountingIDHighLevel ¶
func (s *ManagerSuite) TestJobCountingIDHighLevel()
func (*ManagerSuite) TestJobStatusInvalidFilter ¶
func (s *ManagerSuite) TestJobStatusInvalidFilter()
func (*ManagerSuite) TestJobTiming ¶
func (s *ManagerSuite) TestJobTiming()
func (*ManagerSuite) TestJobTimingMustBeLongerThanASecond ¶
func (s *ManagerSuite) TestJobTimingMustBeLongerThanASecond()
func (*ManagerSuite) TestPruneCompletedJobs ¶
func (s *ManagerSuite) TestPruneCompletedJobs()
func (*ManagerSuite) TestPruneCompletedJobsWithLimit ¶
func (s *ManagerSuite) TestPruneCompletedJobsWithLimit()
func (*ManagerSuite) TestPrunePending ¶
func (s *ManagerSuite) TestPrunePending()
func (*ManagerSuite) TestRecentErrors ¶
func (s *ManagerSuite) TestRecentErrors()
func (*ManagerSuite) TestRecentJobErrors ¶
func (s *ManagerSuite) TestRecentJobErrors()
func (*ManagerSuite) TestTimingWithInvalidFilter ¶
func (s *ManagerSuite) TestTimingWithInvalidFilter()
type PoolTestCase ¶
type PoolTestCase struct { Name string SetPool func(amboy.Queue, int) error SkipRemote bool SkipMulti bool RateLimiting bool MinSize int MaxSize int }
func DefaultPoolTestCases ¶
func DefaultPoolTestCases() []PoolTestCase
type QueueTestCase ¶
type QueueTestCase struct { Name string Constructor func(context.Context, string, int) (amboy.Queue, TestCloser, error) MinSize int MaxSize int DisableParallelTests bool SingleWorker bool MultiSupported bool OrderedSupported bool OrderedStartsBefore bool WaitUntilSupported bool DispatchBeforeSupported bool SkipUnordered bool IsRemote bool Skip bool }
type SizeTestCase ¶
func DefaultSizeTestCases ¶
func DefaultSizeTestCases() []SizeTestCase
type TestCloser ¶
Click to show internal directories.
Click to hide internal directories.