-
Notifications
You must be signed in to change notification settings - Fork 88
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
chore(unit-test): Add missing unit tests in modules with low coverage #1264
chore(unit-test): Add missing unit tests in modules with low coverage #1264
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive work, thank you! Maybe would have been great to split it in multiple PRs (one per module for example) but that's fine. I've added some comments here and there. The biggest thing for me is the factory stuff you've introduced in the serialization module which is too much I think.
...re/src/main/java/software/amazon/lambda/powertools/core/internal/LambdaHandlerProcessor.java
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/core/internal/LambdaHandlerProcessorTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/core/internal/LambdaHandlerProcessorTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/core/internal/LambdaHandlerProcessorTest.java
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/core/internal/LambdaHandlerProcessorTest.java
Outdated
Show resolved
Hide resolved
...c/test/java/software/amazon/lambda/powertools/utilities/jmespath/Base64GZipFunctionTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/validation/internal/ValidationAspectTest.java
Outdated
Show resolved
Hide resolved
...s-parameters/src/main/java/software/amazon/lambda/powertools/parameters/SecretsProvider.java
Outdated
Show resolved
Hide resolved
...tools-parameters/src/main/java/software/amazon/lambda/powertools/parameters/SSMProvider.java
Outdated
Show resolved
Hide resolved
Thanks @jeromevdl Do you think I should move the refactoring to a seperate place? There is also something similar which I wanted to do in the validation module (which I didn't do because I wanted to get comments on the serialization refactoring first). |
I think you can remove it from this PR (keep it in a branch somewhere), write an issue/RFC to explain what you want to do and why (benefits and drawbacks). And according on this, we'll create a PR. I may miss something but at the moment I only see a big number of new classes. Maybe it improves testability of the module but it should not come over the size and thus speed of the library. |
Yes, sorry, I saw this comment first and then the one on the actual changes. I wanted to get input too here, since I too had concerns on the jar size, cold starts etc...We can do as you propose with a seperate issue and see if we need it or not. |
8f04f31
to
88972b9
Compare
…review Co-authored-by: Jérôme Van Der Linden <117538+jeromevdl@users.noreply.github.com>
88972b9
to
b270e14
Compare
...rc/test/java/software/amazon/lambda/powertools/logging/internal/LambdaLoggingAspectTest.java
Outdated
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/logging/internal/LambdaLoggingAspectTest.java
Outdated
Show resolved
Hide resolved
...meters/src/test/java/software/amazon/lambda/powertools/parameters/AppConfigProviderTest.java
Outdated
Show resolved
Hide resolved
...t/java/software/amazon/lambda/powertools/parameters/transform/TransformationManagerTest.java
Outdated
Show resolved
Hide resolved
...n/src/main/java/software/amazon/lambda/powertools/utilities/jmespath/Base64GZipFunction.java
Outdated
Show resolved
Hide resolved
...rc/test/java/software/amazon/lambda/powertools/validation/internal/ValidationAspectTest.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we are almost good, just a few imports to expand and the Bas64Gzip to change to return null when not found instead of "".
...n/src/main/java/software/amazon/lambda/powertools/utilities/jmespath/Base64GZipFunction.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One last thing and we're good.
… base64gzip function invocation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM !
Issue: #1096
Description of changes:
Add unit-tests in the following modules: core, logging, validation, parameters & serialization.
The code coverage in the logging module remains low, since some classes that were deprecated where not covered with tests in this PR.
Includes a proposal for a refactoring in the serialization module.
Checklist
Breaking change checklist
RFC issue #:
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.