Skip to content

Commit f6ec95c

Browse files
address review feedback
1 parent e9c9ada commit f6ec95c

File tree

3 files changed

+13
-14
lines changed

3 files changed

+13
-14
lines changed

internal/internal_worker_test.go

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ func testActivityMultipleArgsWithStruct(ctx context.Context, i int, s testActivi
196196
}
197197

198198
func (s *internalWorkerTestSuite) TestCreateWorker() {
199-
worker := createWorkerWithThrottle(s.T(), s.service, float64(500.0), WorkerOptions{})
199+
worker := createWorkerWithThrottle(s.T(), s.service, 500, WorkerOptions{})
200200
err := worker.Start()
201201
require.NoError(s.T(), err)
202202
time.Sleep(time.Millisecond * 200)
@@ -356,15 +356,15 @@ func createWorker(
356356
t *testing.T,
357357
service *workflowservicetest.MockClient,
358358
) *aggregatedWorker {
359-
return createWorkerWithThrottle(t, service, float64(0.0), WorkerOptions{})
359+
return createWorkerWithThrottle(t, service, 0, WorkerOptions{})
360360
}
361361

362362
func createShadowWorker(
363363
t *testing.T,
364364
service *workflowservicetest.MockClient,
365365
shadowOptions *ShadowOptions,
366366
) *aggregatedWorker {
367-
return createWorkerWithThrottle(t, service, float64(0.0), WorkerOptions{
367+
return createWorkerWithThrottle(t, service, 0, WorkerOptions{
368368
EnableShadowWorker: true,
369369
ShadowOptions: *shadowOptions,
370370
})
@@ -423,28 +423,28 @@ func createWorkerWithDataConverter(
423423
t *testing.T,
424424
service *workflowservicetest.MockClient,
425425
) *aggregatedWorker {
426-
return createWorkerWithThrottle(t, service, float64(0.0), WorkerOptions{DataConverter: newTestDataConverter()})
426+
return createWorkerWithThrottle(t, service, 0, WorkerOptions{DataConverter: newTestDataConverter()})
427427
}
428428

429429
func createWorkerWithAutoscaler(
430430
t *testing.T,
431431
service *workflowservicetest.MockClient,
432432
) *aggregatedWorker {
433-
return createWorkerWithThrottle(t, service, float64(0), WorkerOptions{FeatureFlags: FeatureFlags{PollerAutoScalerEnabled: true}})
433+
return createWorkerWithThrottle(t, service, 0, WorkerOptions{FeatureFlags: FeatureFlags{PollerAutoScalerEnabled: true}})
434434
}
435435

436436
func createWorkerWithStrictNonDeterminismOption(
437437
t *testing.T,
438438
service *workflowservicetest.MockClient,
439439
) *aggregatedWorker {
440-
return createWorkerWithThrottle(t, service, float64(0), WorkerOptions{WorkerBugPorts: WorkerBugPorts{EnableStrictNonDeterminismCheck: true}})
440+
return createWorkerWithThrottle(t, service, 0, WorkerOptions{WorkerBugPorts: WorkerBugPorts{EnableStrictNonDeterminismCheck: true}})
441441
}
442442

443443
func createWorkerWithHost(
444444
t *testing.T,
445445
service *workflowservicetest.MockClient,
446446
) *aggregatedWorker {
447-
return createWorkerWithThrottle(t, service, float64(0), WorkerOptions{Host: "test_host"})
447+
return createWorkerWithThrottle(t, service, 0, WorkerOptions{Host: "test_host"})
448448
}
449449

450450
func (s *internalWorkerTestSuite) testCompleteActivityHelper(opt *ClientOptions) {

internal/worker.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ type (
269269

270270
// Optional: See WorkerBugPorts for more details
271271
//
272-
// Deprecated: This field is deprecated and will be removed in the future.
272+
// Deprecated: All bugports are always deprecated and may be removed at any time.
273273
WorkerBugPorts WorkerBugPorts
274274
}
275275

@@ -281,16 +281,15 @@ type (
281281
// Bugports are always deprecated and may be removed in future versions.
282282
// Generally speaking they will *likely* remain in place for one minor version, and then they may be removed to
283283
// allow cleaning up the additional code complexity that they cause.
284-
// Deprecated: This is deprecated and will be removed in the future.
285-
//
284+
// Deprecated: All bugports are always deprecated and may be removed at any time
286285
WorkerBugPorts struct {
287286
// Optional: Enable strict non-determinism checks for workflow.
288287
// There are some non-determinism cases which are missed by original implementation and a fix is on the way.
289288
// The fix will be activated by this option which basicakky accuracy of the non-determinism checks.
290289
// Exposing this as bugport for now to avoid breaking existing workflows which are actually non-deterministic but users depend on this.
291290
// Once we identify such cases and notify users, we can enable this by default.
292291
//
293-
// Deprecated: This field is deprecated and will be removed in the future.
292+
// Deprecated: All bugports are always deprecated and may be removed at any time
294293
EnableStrictNonDeterminismCheck bool
295294
}
296295
)

internal/workflow.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ type (
481481
// Generally speaking they will *likely* remain in place for one minor version, and then they may be removed to
482482
// allow cleaning up the additional code complexity that they cause.
483483
//
484-
// Deprecated: This field is deprecated and will be removed in the future.
484+
// Deprecated: All bugports are always deprecated and may be removed at any time.
485485
Bugports Bugports
486486
}
487487

@@ -500,7 +500,7 @@ type (
500500
// Generally speaking they will *likely* remain in place for one minor version, and then they may be removed to
501501
// allow cleaning up the additional code complexity that they cause.
502502
//
503-
// DEPRECATED: This is deprecated and will be removed in the future.
503+
// DEPRECATED: All bugports are always deprecated and may be removed at any time.
504504
Bugports struct {
505505
// StartChildWorkflowsOnCanceledContext allows emulating older, buggy behavior that existed prior to v0.18.4.
506506
//
@@ -530,7 +530,7 @@ type (
530530
//
531531
// Added in 0.18.4, this may be removed in or after v0.19.0, so please migrate off of it ASAP.
532532
//
533-
// Deprecated: This field is deprecated and will be removed in the future.
533+
// Deprecated: All bugports are always deprecated and may be removed at any time.
534534
StartChildWorkflowsOnCanceledContext bool
535535
}
536536
)

0 commit comments

Comments
 (0)