AWS Lambda Mock Context Failing Tests
See original GitHub issueIt seems like this is causing some errors occasionally that cause tests to fail.
Error: Task timed out after 3.00 seconds
null._onTimeout (node_modules/aws-lambda-mock-context/index.js:68:17)
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (5 by maintainers)
Top Results From Across the Web
aws-lambda-mock-context - npm
AWS Lambda mock context object. Latest version: 3.2.1, last published: 4 years ago. Start using aws-lambda-mock-context in your project by ...
Read more >Mock Lambda callback in Jest? (Cannot read property body of ...
The expectation needs to move into the callback. The test will fail with a timeout if done() is not called. The expectation needs...
Read more >Testing AWS Lambda functions written in Java
Testing is an essential task when building software. Testing helps improve software quality by finding bugs before they reach production.
Read more >Unit testing on Lambda - Medium
very little code so no need to test, difficulties to mock AWS services or to simulate Lambda), but none of them should lead...
Read more >How I Write Meaningful Tests for AWS Lambda Functions
To get around this problem, one approach is to set up and later tear down separate test resources. A cleaner approach though, is...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Is this all due to the lib we are using? If so we should just bail on it and make our own. We should throw and error on using those old methods.
On Jun 7, 2017 10:29 AM, “Chris Olszewski” notifications@github.com wrote:
I think issues are being caused since we don’t
cxt.succeed()
the timeout triggers so even when a function run is successful if the process is still running 3 seconds later, context will throw a timeout error.