Skip to content

Commit ad2f801

Browse files
lym953claude
andcommitted
test: shorten comments in durable cold-start integration test
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 3e0be33 commit ad2f801

2 files changed

Lines changed: 4 additions & 18 deletions

File tree

integration-tests/lib/stacks/durable-cold-start.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,7 @@ import {
1010
defaultNodeRuntime,
1111
} from '../util';
1212

13-
// Durable-function cold-start metric tag test.
14-
// The Lambda Telemetry API only reports a `platform.initStart` runtimeVersion
15-
// containing "DurableFunction" for functions actually configured with
16-
// `durableConfig`, so this stack deploys one durable and one non-durable
17-
// function to exercise bottlecap's `durable_function:true` tagging on the
18-
// cold-start `aws.lambda.enhanced.invocations` metric end-to-end.
13+
// Deploys a durable and a non-durable function to test the cold-start durable_function tag.
1914
export class DurableColdStart extends cdk.Stack {
2015
constructor(scope: Construct, id: string, props: cdk.StackProps) {
2116
super(scope, id, props);

integration-tests/tests/durable-cold-start.test.ts

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
// Verifies bottlecap holds the cold-start `aws.lambda.enhanced.invocations`
2-
// metric until the Telemetry API's `platform.initStart` event reports the
3-
// runtime, so the metric carries `durable_function:true` for a real
4-
// durable-configured Lambda function (#1301). A plain (non-durable) function
5-
// is invoked alongside as a guard against the tag being set unconditionally.
1+
// Verifies the cold-start invocations metric has durable_function:true only for a durable function.
62
import { hasMetricWithTag } from './utils/datadog';
73
import { forceColdStart, invokeLambda } from './utils/lambda';
84
import { IDENTIFIER, DEFAULT_DATADOG_INDEXING_WAIT_MS } from '../config';
@@ -23,15 +19,10 @@ describe('Durable Function Cold-Start Metric Tag Integration Tests', () => {
2319

2420
await Promise.all(functionNames.map((fn) => forceColdStart(fn)));
2521

26-
// Back up the query window by 60s so the metric bucket (which Datadog
27-
// aligns to the rollup interval boundary, often before the invocation)
28-
// falls inside the range we pass to /api/v1/query.
22+
// Back up 60s so the metric's rollup bucket falls inside the query range.
2923
invocationStartTime = Date.now() - 60_000;
3024

31-
// Durable functions reject unqualified-ARN invokes ("You cannot invoke a
32-
// durable function using an unqualified ARN"); `:$LATEST` satisfies that
33-
// without publishing a version. Metric queries below use the base
34-
// (unqualified) function name, which is unaffected by this qualifier.
25+
// Durable functions reject unqualified-ARN invokes; `:$LATEST` avoids publishing a version.
3526
await Promise.all([
3627
invokeLambda(`${durableFunctionName}:$LATEST`),
3728
invokeLambda(nonDurableFunctionName),

0 commit comments

Comments
 (0)