Skip to content

Commit 2d57637

Browse files
jchrostek-ddclaude
andcommitted
fix: use publishVersion for SnapStart Java in auth test
forceColdStart uses UpdateFunctionConfiguration which doesn't work on qualified ARNs. Use publishVersion + waitForSnapStartReady instead, matching the pattern from snapstart.test.ts. Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
1 parent 187a072 commit 2d57637

File tree

1 file changed

+11
-5
lines changed

1 file changed

+11
-5
lines changed

integration-tests/tests/auth.test.ts

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { invokeAndCollectTelemetry, FunctionConfig } from './utils/default';
22
import { DatadogTelemetry } from './utils/datadog';
3-
import { forceColdStart } from './utils/lambda';
3+
import { forceColdStart, publishVersion, waitForSnapStartReady } from './utils/lambda';
44
import { getIdentifier } from '../config';
55

66
const identifier = getIdentifier();
@@ -12,13 +12,19 @@ describe('Auth Integration Tests', () => {
1212
const getFirstInvocation = (runtime: string) => telemetry[runtime]?.threads[0]?.[0];
1313

1414
beforeAll(async () => {
15+
const nodeFunctionName = `${stackName}-node`;
16+
const javaFunctionName = `${stackName}-java`;
17+
18+
await forceColdStart(nodeFunctionName);
19+
20+
const javaVersion = await publishVersion(javaFunctionName);
21+
await waitForSnapStartReady(javaFunctionName, javaVersion);
22+
1523
const functions: FunctionConfig[] = [
16-
{ functionName: `${stackName}-node`, runtime: 'node' },
17-
{ functionName: `${stackName}-java:snapstart`, runtime: 'java' },
24+
{ functionName: nodeFunctionName, runtime: 'node' },
25+
{ functionName: `${javaFunctionName}:${javaVersion}`, runtime: 'java' },
1826
];
1927

20-
await Promise.all(functions.map(fn => forceColdStart(fn.functionName)));
21-
2228
telemetry = await invokeAndCollectTelemetry(functions, 1);
2329

2430
console.log('All invocations and data fetching completed');

0 commit comments

Comments
 (0)