Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( MatchingDisableSyncMatch = newKey[bool, namespace.ID]() MatchingLBForceReadPartition = newKey[int, namespace.ID]() MatchingLBForceWritePartition = newKey[int, namespace.ID]() UpdateWithStartInBetweenLockAndStart = newKey[func(), namespace.ID]() UpdateWithStartOnClosingWorkflowRetry = newKey[func(), namespace.ID]() TaskQueuesInDeploymentSyncBatchSize = newKey[int, global]() MatchingIgnoreRoutingConfigRevisionCheck = newKey[bool, namespace.ID]() MatchingDeploymentRegisterErrorBackoff = newKey[time.Duration, namespace.ID]() MatchingForwardTaskDelay = newKey[time.Duration, namespace.ID]() )
Test hook keys with their return type and scope. Try to avoid global scope as it requires a dedicated test cluster.
var GlobalScope = global{}
GlobalScope is the singleton value for global hooks.
var Module = fx.Options( fx.Provide(NewTestHooks), )
Functions ¶
func Call ¶
Call calls a func() hook if present.
TestHooks should be used very sparingly, see comment on TestHooks.
Types ¶
type Hook ¶
type Hook struct{}
Hook is an empty stub in production mode. NewHook and its methods are only available with -tags=test_dep.
type TestHooks ¶
type TestHooks struct{}
TestHooks (in production mode) is an empty struct just so the build works. See TestHooks in test_impl.go.
TestHooks are an inherently unclean way of writing tests. They require mixing test-only concerns into production code. In general you should prefer other ways of writing tests wherever possible, and only use TestHooks sparingly, as a last resort.
func NewTestHooks ¶
func NewTestHooks() TestHooks