Skip to content

Commit c39a164

Browse files
committed
update
1 parent 9d76f62 commit c39a164

6 files changed

Lines changed: 11 additions & 6 deletions

File tree

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
1+
import logging
2+
3+
logger = logging.getLogger()
4+
logger.setLevel(logging.INFO)
5+
16
def handler(event, context):
2-
print('Hello world!')
7+
logger.info('Hello world!')
38
return {
49
'statusCode': 200
510
}

integration-tests/lib/base-node-stack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class BaseNodeStack extends cdk.Stack {
77
constructor(scope: Construct, id: string, props: cdk.StackProps) {
88
super(scope, id, props);
99

10-
const nodeFunctionName = `${id}-node-function`
10+
const nodeFunctionName = `${id}-lambda`
1111
const nodeFunction = new lambda.Function(this, nodeFunctionName, {
1212
runtime: lambda.Runtime.NODEJS_20_X,
1313
architecture: lambda.Architecture.ARM_64,

integration-tests/lib/base-python-stack.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export class BasePythonStack extends cdk.Stack {
77
constructor(scope: Construct, id: string, props: cdk.StackProps) {
88
super(scope, id, props);
99

10-
const pythonFunctionName = `${id}-python-function`
10+
const pythonFunctionName = `${id}-lambda`
1111
const pythonFunction = new lambda.Function(this, pythonFunctionName, {
1212
runtime: lambda.Runtime.PYTHON_3_12,
1313
architecture: lambda.Architecture.ARM_64,

integration-tests/tests/base-node.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { invokeLambdaAndGetDatadogData } from './utils/util';
22
import { getIdentifier } from './utils/config';
33

44
describe('Base Node Lambda Integration Test', () => {
5-
const NODE_FUNCTION_NAME = `integ-${getIdentifier()}-base-node-node-function`;
5+
const NODE_FUNCTION_NAME = `integ-${getIdentifier()}-base-node-lambda`;
66

77
it('should invoke Node.js Lambda successfully and receive logs and traces in Datadog', async () => {
88

integration-tests/tests/base-python.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { invokeLambdaAndGetDatadogData } from './utils/util';
22
import { getIdentifier } from './utils/config';
33

44
describe('Base Python Lambda Integration Test', () => {
5-
const PYTHON_FUNCTION_NAME = `integ-${getIdentifier()}-base-python-python-function`;
5+
const PYTHON_FUNCTION_NAME = `integ-${getIdentifier()}-base-python-lambda`;
66

77
it('should invoke Python Lambda successfully and receive logs and traces in Datadog', async () => {
88

integration-tests/tests/utils/util.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export async function invokeLambdaAndGetDatadogData(functionName: string, payloa
1313
const result = await invokeLambda(functionName, payload, coldStart, false);
1414

1515
console.log('Waiting 10 minutes for logs and traces to be indexed in Datadog...');
16-
await new Promise(resolve => setTimeout(resolve, 600000));
16+
await new Promise(resolve => setTimeout(resolve, 300000));
1717

1818
const traces = await getTraces(functionName, result.requestId);
1919
const logs = await getLogs(functionName, result.requestId);

0 commit comments

Comments
 (0)