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
Improve mail test coverage #3674 #3685
Improve mail test coverage #3674 #3685
Conversation
integration-tests/mail/src/main/java/org/apache/camel/quarkus/component/mail/CamelResource.java
Outdated
Show resolved
Hide resolved
Is ssl support already covered ? If not, would there be any interest ? Maybe another PR anyway. |
Also, it looks jakarta.mail is using Locale.ENGLISH a lot for instance |
@JiriOndrusek if you choose to do any more changes, please rebase too. |
IMO we should test all of the protocols supported by the component. Seems we just cover |
22895a6
to
a1aac97
Compare
I'll add test coverage for ssl and other protocols as well. |
Jiri, more context on the instinct that we may have issues with locales. So, on a machine with another default locale, I wonder how all the english/us locale from jakarta.mail would behave. Now, about how to test with another default locale, one can try to play with |
a1aac97
to
b8bfb8a
Compare
Still work in progress. I refactored test coverage to use greenmail (as docker image). SSL coverage is still missing. |
e3c1696
to
d776f27
Compare
03e7891
to
29add62
Compare
PR is complete. Tests cover all protocols + ssl. I used java mail properties to trust all certificates:
(because In case that the security tests will be revisited, it would be helpful to wait for the new version of greenmail docker container (1.6.8+ or 2.0.0-alpha-3+) with following fix greenmail-mail-test/greenmail@37a09af#diff-5dfefe1b55f9a4d77b491f77357ebb0910cd2d088a51c46c0ec62a5aa8bc8b59R24-R31 |
b6b925a
to
8b276d1
Compare
8b276d1
to
6676b17
Compare
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.
Sorry - I had another scan through the PR and have some additional comments.
integration-tests/mail/src/main/java/org/apache/camel/quarkus/component/mail/CamelRoute.java
Show resolved
Hide resolved
integration-tests/mail/src/test/java/org/apache/camel/quarkus/component/mail/MailTest.java
Outdated
Show resolved
Hide resolved
6676b17
to
2bce0ac
Compare
@jamesnetherton It would be nice to get this PR tested on the machine with different default locale (as @aldettinger mentioned in older comment). Do we have this option on some of testing machines? |
Not really..... You could either build your own VM and set an appropriate locale for testing. Or experiment with GitHub actions on your fork and change the system locale before the native test runs. Probably best to capture this as a follow up issue as I'd like to get this PR merged and not leave it dangling much longer. |
yes, I agree to not delay this PR. |
fixes #3674