( ctx context.Context, t *testing.T, usePriMatcher bool, behavior testcore.MatchingBehavior, extraOpts ...testcore.TestOption, )
| 60 | } |
| 61 | |
| 62 | func 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. |
| 92 | type TaskQueueStatsSuite struct { |
no test coverage detected