From 629b13113dd5282b369b196417b7c3e443f7f44f Mon Sep 17 00:00:00 2001 From: go-to-k <24818752+go-to-k@users.noreply.github.com> Date: Thu, 7 Sep 2023 16:27:03 +0900 Subject: [PATCH] change for re-review --- packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts | 4 ++-- .../@aws-cdk/aws-apprunner-alpha/test/service.test.ts | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts b/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts index 92d851d08acd1..4022788b6b197 100644 --- a/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts +++ b/packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts @@ -1372,12 +1372,12 @@ export class Service extends cdk.Resource implements iam.IGrantable { } if (healthCheckConfiguration.interval !== undefined) { if (healthCheckConfiguration.interval.toSeconds() < 1 || healthCheckConfiguration.interval.toSeconds() > 20) { - throw new Error(`interval must be between 1 and 20 seconds, got ${healthCheckConfiguration.interval}`); + throw new Error(`interval must be between 1 and 20 seconds, got ${healthCheckConfiguration.interval.toSeconds()}`); } } if (healthCheckConfiguration.timeout !== undefined) { if (healthCheckConfiguration.timeout.toSeconds() < 1 || healthCheckConfiguration.timeout.toSeconds() > 20) { - throw new Error(`timeout must be between 1 and 20 seconds, got ${healthCheckConfiguration.timeout}`); + throw new Error(`timeout must be between 1 and 20 seconds, got ${healthCheckConfiguration.timeout.toSeconds()}`); } } } diff --git a/packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts b/packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts index 95da6e340604f..b788ce7e90b63 100644 --- a/packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts +++ b/packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts @@ -1564,7 +1564,7 @@ test('interval must be greater than or equal to 1 in healthCheckConfiguration', unhealthyThreshold: 5, }, }); - }).toThrow('interval must be between 1 and 20 seconds, got Duration.seconds(0)'); + }).toThrow('interval must be between 1 and 20 seconds, got 0'); }); test('interval must be less than or equal to 20 in healthCheckConfiguration', () => { @@ -1587,7 +1587,7 @@ test('interval must be less than or equal to 20 in healthCheckConfiguration', () unhealthyThreshold: 5, }, }); - }).toThrow('interval must be between 1 and 20 seconds, got Duration.seconds(21)'); + }).toThrow('interval must be between 1 and 20 seconds, got 21'); }); test('timeout must be greater than or equal to 1 in healthCheckConfiguration', () => { @@ -1610,7 +1610,7 @@ test('timeout must be greater than or equal to 1 in healthCheckConfiguration', ( unhealthyThreshold: 5, }, }); - }).toThrow('timeout must be between 1 and 20 seconds, got Duration.seconds(0)'); + }).toThrow('timeout must be between 1 and 20 seconds, got 0'); }); test('timeout must be less than or equal to 20 in healthCheckConfiguration', () => { @@ -1633,5 +1633,5 @@ test('timeout must be less than or equal to 20 in healthCheckConfiguration', () unhealthyThreshold: 5, }, }); - }).toThrow('timeout must be between 1 and 20 seconds, got Duration.seconds(21)'); + }).toThrow('timeout must be between 1 and 20 seconds, got 21'); }); \ No newline at end of file