Skip to content
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

fix email test without "en" i18n #18228

Merged
merged 1 commit into from
Mar 28, 2022

Conversation

Rileran
Copy link
Contributor

@Rileran Rileran commented Mar 28, 2022

When generating a project with i18n support, but without choosing English as either the default language or an additional language, a test case in MailServiceIT won't pass as the language key "en" is hardcoded.

I have included a log file showing the result of mvnw -ntp -Pprod verify with the given configuration. This is the interesting part

[INFO] Running com.mycompany.myapp.service.MailServiceIT
2022-03-28 11:48:10.804  WARN 2694 --- [           main] com.mycompany.myapp.service.MailService  : Email could not be sent to user 'john.doe@example.com'

org.springframework.mail.MailSendException: null

[ERROR] Tests run: 10, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.758 s <<< FAILURE! - in com.mycompany.myapp.service.MailServiceIT
[ERROR] com.mycompany.myapp.service.MailServiceIT.testSendEmailFromTemplate  Time elapsed: 0.009 s  <<< ERROR!
org.springframework.context.NoSuchMessageException: No message found under code 'email.test.title' for locale 'en'.
	at com.mycompany.myapp.service.MailServiceIT.testSendEmailFromTemplate(MailServiceIT.java:140)```

This was tested using docker image jhipster/jhipster:v7.7.0.

verify.log


Please make sure the below checklist is followed for Pull Requests.

When you are still working on the PR, consider converting it to Draft (below reviewers) and adding skip-ci label, you can still see CI build result at your branch.

@CLAassistant
Copy link

CLAassistant commented Mar 28, 2022

CLA assistant check
All committers have signed the CLA.

@DanielFran
Copy link
Member

Thanks @Rileran for the contribution

@DanielFran DanielFran merged commit b23f180 into jhipster:main Mar 28, 2022
@pascalgrimaud pascalgrimaud added this to the 7.8.0 milestone Apr 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants