Documentation
¶
Overview ¶
Package conformance provides a suite of conformance tests for workqueue implementations.
Use TestSemantics and TestConcurrency to verify that a workqueue.Interface implementation satisfies the expected behavioral contracts.
Index ¶
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func TestDurability ¶
Unlike the other tests, this one is only expected for implementations that have some degree of durability. For instance, the in-memory implementation will not pass this test.
func TestMaxRetry ¶
TestMaxRetry tests the max retry functionality with Fail method
Types ¶
type ExpectedState ¶
Example ¶
ExampleExpectedState demonstrates constructing an ExpectedState value used by the conformance suite to assert queue contents.
package main
import (
"fmt"
"chainguard.dev/driftlessaf/workqueue/conformance"
)
func main() {
es := conformance.ExpectedState{
WorkInProgress: []string{"key-a"},
Queued: []string{"key-b", "key-c"},
}
fmt.Printf("wip=%d queued=%d\n", len(es.WorkInProgress), len(es.Queued))
}
Output: wip=1 queued=2
Click to show internal directories.
Click to hide internal directories.