Skip to content

Commit 0fa811a

Browse files
committed
WIP
1 parent 66bb82a commit 0fa811a

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

Diff for: packages/logger/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@
8181
"url": "https://github.com/awslabs/aws-lambda-powertools-typescript/issues"
8282
},
8383
"dependencies": {
84-
"@aws-lambda-powertools/commons": "^0.2.0",
84+
"@aws-lambda-powertools/commons": "^0.6.0",
8585
"@types/aws-lambda": "^8.10.72",
8686
"lodash.clonedeep": "^4.5.0",
8787
"lodash.merge": "^4.6.2",

Diff for: packages/logger/tests/e2e/basicFeatures.middy.test.ts

+5-7
Original file line numberDiff line numberDiff line change
@@ -98,18 +98,16 @@ describe(`logger E2E tests basic functionalities (middy) for runtime: ${runtime}
9898
}
9999
}, TEST_CASE_TIMEOUT);
100100

101-
it('should include cold metrics only on the first invocation', async () => {
101+
it('should include cold start equal to TRUE only on the first invocation', async () => {
102102
const coldStartLogMessages = invocationLogs[0].getFunctionLogs(LEVEL.INFO);
103103
for (const message of coldStartLogMessages) {
104104
expect(message).toContain(`"cold_start":true`);
105105
}
106106

107-
// TODO: There is a bug that the 'cold_start' field leaks to all invocation. (#518)
108-
// Link to tracked issue: https://github.com/awslabs/aws-lambda-powertools-typescript/issues/518
109-
// const normalLogMessages = invocationLogs[1].getFunctionLogs(LEVEL.INFO);
110-
// for(const message of normalLogMessages) {
111-
// expect(message).not.toContain(`"cold_start":true`);
112-
// }
107+
const normalLogMessages = invocationLogs[1].getFunctionLogs(LEVEL.INFO);
108+
for (const message of normalLogMessages) {
109+
expect(message).not.toContain(`"cold_start":true`);
110+
}
113111
}, TEST_CASE_TIMEOUT);
114112
});
115113

0 commit comments

Comments
 (0)