-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Test cleanup: Split tests into unit, integ, e2e + additional mocking #369
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Goal of this break-out is to be able to separate unit / integration / end-to-end tests. An e2e test is defined as going through the API gateway. We want to get the unit tests running quicker for future work.
Move all handlers / repositories over there. Can move them back gradually in debugging the open handles.
andysmith415
requested review from
zhongeric,
marktoda,
cgkol and
robert-seitz-uniswap
March 3, 2024 02:17
The success cases are all taking 1+ second, so something is systemically wrong there. Until that is debugged, move them out.
This can be overwritten on a per-test basis as needed. The default metricsScope has a fair amount of environment manipulation when it flushes (https://github.com/awslabs/aws-embedded-metrics-node/blob/master/src/logger/MetricsLogger.ts#L42) which was making the handler tests take one second.
The aws-embedded-metrics mock sped this up.
andysmith415
changed the title
Split tests into unit, integ, e2e
Test cleanup: Split tests into unit, integ, e2e + additional mocking
Mar 3, 2024
robert-seitz-uniswap
approved these changes
Mar 4, 2024
cgkol
approved these changes
Mar 6, 2024
* Refactor: Drop BaseInjector * Drop base lambda handler * Drop BaseHandleRequestParams No longer used. * Rename base.ts to ErrorCode.ts since it's the only file left. * Silo handler functions (#371) Move entrypoints for each lambda to individual files
marktoda
approved these changes
Mar 6, 2024
Merged
@robert-seitz-uniswap landed this as part of #376 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
network-requests
file; it's unused as it stands and we can always bring it back.Main motivation here is to get the unit tests running more quickly and to get to the bottom of some of the suppressions across the testing codebase, notably the es-lint/ts disable checks as well as the need to have
--detectOpenHandles
and--forceExits
enabled. The latter is indicative of an unresolved promise firing after the test completes, so something to figure out.The check-order-status tests have some dangling promises that are prevently clean exits. Until those are addressed, they can live in integ/ where
--forceExits
is used.