You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2022/03/30 12:29:42 UTC

[GitHub] [camel-quarkus] JiriOndrusek opened a new pull request #3685: Improve mail test coverage #3674

JiriOndrusek opened a new pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685


   fixes https://github.com/apache/camel-quarkus/issues/3674
   
   <!-- Uncomment and fill this section if your PR is not trivial
   [ ] An issue should be filed for the change unless this is a trivial change (fixing a typo or similar). One issue should ideally be fixed by not more than one commit and the other way round, each commit should fix just one issue, without pulling in other changes.
   [ ] Each commit in the pull request should have a meaningful and properly spelled subject line and body. Copying the title of the associated issue is typically enough. Please include the issue number in the commit message prefixed by #.
   [ ] The pull request description should explain what the pull request does, how, and why. If the info is available in the associated issue or some other external document, a link is enough.
   [ ] Phrases like Fix #<issueNumber> or Fixes #<issueNumber> will auto-close the named issue upon merging the pull request. Using them is typically a good idea.
   [ ] Please run mvn process-resources -Pformat (and amend the changes if necessary) before sending the pull request.
   [ ] Contributor guide is your good friend: https://camel.apache.org/camel-quarkus/latest/contributor-guide.html
   -->


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#discussion_r838763427



##########
File path: integration-tests/mail/src/main/java/org/apache/camel/quarkus/component/mail/CamelResource.java
##########
@@ -67,4 +111,126 @@ public String mimeMultipart(String body, @PathParam("fileName") String fileName,
         }).getMessage().getBody(String.class);
     }
 
+    @Path("/send")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public void send(List<String> messages) throws Exception {
+        JavaMailSender sender = new DefaultJavaMailSender();
+        store.connect("localhost", 25, "jones", "secret");

Review comment:
       Will the tests always use port 25 ? Would there be a way to change this ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] JiriOndrusek commented on a change in pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on a change in pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#discussion_r839224035



##########
File path: integration-tests/mail/src/main/java/org/apache/camel/quarkus/component/mail/CamelResource.java
##########
@@ -67,4 +111,126 @@ public String mimeMultipart(String body, @PathParam("fileName") String fileName,
         }).getMessage().getBody(String.class);
     }
 
+    @Path("/send")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public void send(List<String> messages) throws Exception {
+        JavaMailSender sender = new DefaultJavaMailSender();
+        store.connect("localhost", 25, "jones", "secret");

Review comment:
       Port shouldn't be there I removed it. Thanks for finding it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1085961381


   Still work in progress. I refactored test coverage to use greenmail (as docker image). SSL coverage is still missing.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1084136880


   > Is ssl support already covered
   
   IMO we should test all of the protocols supported by the component. Seems we just cover `pop3` at the moment.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
aldettinger commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1083394643


   Also, it looks jakarta.mail is using Locale.ENGLISH a lot for instance `charset.toLowerCase(Locale.ENGLISH)`. I wonder if it would be possible to run the tests in native mode once on a machine where the default Locale is not english to see whether there is an issue.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
ppalaga commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1083692918


   @JiriOndrusek  if you choose to do any more changes, please rebase too.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] JiriOndrusek commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
JiriOndrusek commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1084147627


   I'll add test coverage for ssl and other protocols as well. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
aldettinger commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1084224174


   Jiri, more context on the instinct that we may have issues with locales.
   There are clues that in native mode, only the default locale is embedded:
   https://github.com/apache/camel-quarkus/issues/1861
   
   So, on a machine with another default locale, I wonder how all the english/us locale from jakarta.mail would behave.
   Note that it's just instinct, not actual problem seen.
   
   Now, about how to test with another default locale, one can try to play with `-Duser.country=CN -Duser.language=zh` but I'm not sure it would have same effect has a default locale coming from the environment. In which case maybe @zhfeng or @ffang  may perharps try to run this PR locally if they have time.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga commented on a change in pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
ppalaga commented on a change in pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#discussion_r839013657



##########
File path: integration-tests/mail/src/main/java/org/apache/camel/quarkus/component/mail/CamelResource.java
##########
@@ -67,4 +111,126 @@ public String mimeMultipart(String body, @PathParam("fileName") String fileName,
         }).getMessage().getBody(String.class);
     }
 
+    @Path("/send")
+    @POST
+    @Consumes(MediaType.APPLICATION_JSON)
+    public void send(List<String> messages) throws Exception {
+        JavaMailSender sender = new DefaultJavaMailSender();
+        store.connect("localhost", 25, "jones", "secret");

Review comment:
       What is supposed to serve this port 25? I do not see any testcontainer or anything. 




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on pull request #3685: Improve mail test coverage #3674

Posted by GitBox <gi...@apache.org>.
aldettinger commented on pull request #3685:
URL: https://github.com/apache/camel-quarkus/pull/3685#issuecomment-1083384344


   Is ssl support already covered ? If not, would there be any interest ? Maybe another PR anyway.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org