Skip to content

Commit 6b028ad

Browse files
committed
fix test
1 parent e7776be commit 6b028ad

File tree

2 files changed

+7
-7
lines changed

2 files changed

+7
-7
lines changed

internal/internal_worker_base.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -428,15 +428,15 @@ func (bw *baseWorker) Stop() {
428428
func getAutoConfigHint(task interface{}) *shared.AutoConfigHint {
429429
switch t := task.(type) {
430430
case *workflowTask:
431-
if t.task == nil {
432-
return nil
431+
if t.task != nil {
432+
return t.task.AutoConfigHint
433433
}
434-
return t.task.AutoConfigHint
434+
return t.autoConfigHint
435435
case *activityTask:
436-
if t.task == nil {
437-
return nil
436+
if t.task != nil {
437+
return t.task.AutoConfigHint
438438
}
439-
return t.task.AutoConfigHint
439+
return t.autoConfigHint
440440
default:
441441
return nil
442442
}

internal/internal_worker_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ func Test_augmentWorkerOptions(t *testing.T) {
13771377
WorkerDecisionTasksPerSecond: 100000,
13781378
MaxConcurrentDecisionTaskPollers: 2,
13791379
MinConcurrentDecisionTaskPollers: 2,
1380-
PollerAutoScalerCooldown: time.Minute,
1380+
PollerAutoScalerCooldown: time.Second * 10,
13811381
PollerAutoScalerTargetUtilization: 0.6,
13821382
PollerAutoScalerDryRun: false,
13831383
Identity: "",

0 commit comments

Comments
 (0)