Skip to content

Refactor the scheduler test because it's flaky #45

@Skarlso

Description

@Skarlso

Smells:

scheduler_test.go:144:146

	// Wait some time to pickup work and finish.
	// We have to wait at least 3 seconds for scheduler tick interval.
	time.Sleep(5 * time.Second)

This just failed with the error that the job is in an invalid status. I think this should be fortified or it will cause problems in the future. The scheduler needs to be tested in a different way, or manually kicked off at this stage, or somehow signal on a channel that it's done with its round.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions