Skip to content

Commit

Permalink
change for re-review
Browse files Browse the repository at this point in the history
  • Loading branch information
go-to-k committed Sep 7, 2023
1 parent 9e84888 commit 629b131
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions packages/@aws-cdk/aws-apprunner-alpha/lib/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()}`);
}
}
}
Expand Down
8 changes: 4 additions & 4 deletions packages/@aws-cdk/aws-apprunner-alpha/test/service.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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', () => {
Expand All @@ -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');
});

0 comments on commit 629b131

Please sign in to comment.