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

[Bug] [DolphinScheduler-alert-email] Running unit test testGetMessageFromTemplate() fails #10277

Closed
3 tasks done
106umao opened this issue May 29, 2022 · 1 comment · Fixed by #10278
Closed
3 tasks done
Assignees
Labels
backend bug Something isn't working
Milestone

Comments

@106umao
Copy link
Contributor

106umao commented May 29, 2022

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

I can pass this test case on linux, but there is a problem on windows. Through debug, it is found that there is a problem with the newline character of the string generated by the generateMockTableTypeResultByHand() method. This method does not consider platform independence and uses LF hard-coded as a newline

What you expected to happen

generateMockTableTypeResultByHand() generates platform-independent strings that pass the test case

How to reproduce

OS : windows 10
JDK : JDK 8
Run mvn clean test -e in command line window

Anything else

Bug info
`
[INFO] Running org.apache.dolphinscheduler.plugin.alert.email.template.DefaultHTMLTemplateTest
[ERROR] Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.004 s <<< FAILURE! - in org.apache.dolphinscheduler.plugin.alert.email.template.DefaultHTMLTemplateTest
Tests run: 1, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 0.004 s <<< FAILURE! - in org.apache.dolphinscheduler.plugin.alert.email.template.DefaultHTMLTemplateTest
testGetMessageFromTemplate(org.apache.dolphinscheduler.plugin.alert.email.template.DefaultHTMLTemplateTest) Time elapsed: 0.004 s <<< FAILURE!

org.junit.ComparisonFailure:
]

mysql200 but was:<...er[] mysql200 at org.apache.dolphinscheduler.plugin.alert.email.template.DefaultHTMLTemplateTest.testGetMessageFromTemplate(DefaultHTMLTemplateTest.java:44) [INFO] [INFO] Results: [INFO] [ERROR] Failures: Failures:

]

mysql200 but was:<...er[] mysql200 [INFO] [ERROR] Tests run: 10, Failures: 1, Errors: 0, Skipped: 0 Tests run: 10, Failures: 1, Errors: 0, Skipped: 0

[INFO]

`

Version

dev

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@106umao 106umao added bug Something isn't working Waiting for reply Waiting for reply labels May 29, 2022
@github-actions
Copy link

Thank you for your feedback, we have received your issue, Please wait patiently for a reply.

  • In order for us to understand your request as soon as possible, please provide detailed information、version or pictures.
  • If you haven't received a reply for a long time, you can join our slack and send your question to channel #troubleshooting

@SbloodyS SbloodyS added backend and removed Waiting for reply Waiting for reply labels May 29, 2022
SbloodyS pushed a commit that referenced this issue May 29, 2022
… (#10278)

* [Fix] Fix the line.separator problem for alert-plugin' test case

* [Fix] Fix the line.separator problem for alert-plugin' test case
@devosend devosend added this to the 3.0.0-beta-2 milestone Jun 16, 2022
devosend pushed a commit that referenced this issue Jun 17, 2022
… (#10278)

* [Fix] Fix the line.separator problem for alert-plugin' test case

* [Fix] Fix the line.separator problem for alert-plugin' test case

(cherry picked from commit 62bd9d2)
ITBOX-ITBOY pushed a commit to ITBOX-ITBOY/dolphinscheduler that referenced this issue Jul 8, 2022
…he#10277 (apache#10278)

* [Fix] Fix the line.separator problem for alert-plugin' test case

* [Fix] Fix the line.separator problem for alert-plugin' test case
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants