MCPcopy Create free account
hub / github.com/temporalio/temporal / newTaskQueueStatsContext

Function newTaskQueueStatsContext

tests/task_queue_stats_test.go:62–89  ·  view source on GitHub ↗
(
	ctx context.Context,
	t *testing.T,
	usePriMatcher bool,
	behavior testcore.MatchingBehavior,
	extraOpts ...testcore.TestOption,
)

Source from the content-addressed store, hash-verified

60}
61
62func newTaskQueueStatsContext(
63 ctx context.Context,
64 t *testing.T,
65 usePriMatcher bool,
66 behavior testcore.MatchingBehavior,
67 extraOpts ...testcore.TestOption,
68) *taskQueueStatsContext {
69 opts := []testcore.TestOption{
70 testcore.WithDynamicConfig(dynamicconfig.EnableDeploymentVersions, true),
71 testcore.WithDynamicConfig(dynamicconfig.FrontendEnableWorkerVersioningWorkflowAPIs, true),
72 testcore.WithDynamicConfig(dynamicconfig.MatchingUseNewMatcher, usePriMatcher),
73 testcore.WithDynamicConfig(dynamicconfig.MatchingPriorityLevels, 5), // maxPriority
74 }
75 opts = append(opts, behavior.Options()...)
76 opts = append(opts, extraOpts...)
77 env := newVersioningTestEnv(t, opts...)
78 behavior.InjectHooks(env)
79 return &taskQueueStatsContext{
80 VersioningTestEnv: env,
81 tb: t,
82 ctx: ctx,
83 usePriMatcher: usePriMatcher,
84 minPriority: 1,
85 maxPriority: 5,
86 defaultPriority: 3,
87 partitionCount: 2, // kept low to reduce test time on CI
88 }
89}
90
91// TaskQueueStatsSuite groups task queue stats tests that are run with different matcher configurations.
92type TaskQueueStatsSuite struct {

Callers 2

Calls 4

WithDynamicConfigFunction · 0.92
newVersioningTestEnvFunction · 0.85
OptionsMethod · 0.80
InjectHooksMethod · 0.80

Tested by

no test coverage detected