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

chapter2-5 测试好像有问题 #52

Open
yansheng836 opened this issue Aug 1, 2020 · 0 comments
Open

chapter2-5 测试好像有问题 #52

yansheng836 opened this issue Aug 1, 2020 · 0 comments

Comments

@yansheng836
Copy link

yansheng836 commented Aug 1, 2020

1.测试问题

@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.DEFINED_PORT)改为@SpringBootTest好像就可以了。
see https://github.com/dyc87112/SpringBoot-Learning/blob/master/2.1.x/chapter2-5/src/test/java/com/didispace/chapter25/DemoApplicationTests.java#L17

2.maven install问题

[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 6.329 s <<< FAILURE! - in com.didispace.chapter25.DemoApplicationTests
[ERROR] generateAsciiDocs(com.didispace.chapter25.DemoApplicationTests)  Time elapsed: 0.736 s  <<< ERROR!
java.lang.NoClassDefFoundError: org/pegdown/PegDownProcessor
	at com.didispace.chapter25.DemoApplicationTests.generateAsciiDocs(DemoApplicationTests.java:35)
Caused by: java.lang.ClassNotFoundException: org.pegdown.PegDownProcessor
	at com.didispace.chapter25.DemoApplicationTests.generateAsciiDocs(DemoApplicationTests.java:35)

2020-08-01 11:35:18.228  INFO 9356 --- [       Thread-2] o.s.s.concurrent.ThreadPoolTaskExecutor  : Shutting down ExecutorService 'applicationTaskExecutor'
[INFO] 
[INFO] Results:
[INFO] 
[ERROR] Errors: 
[ERROR]   DemoApplicationTests.generateAsciiDocs:35 » NoClassDefFound org/pegdown/PegDow...
[INFO] 
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0
[INFO] 
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time:  16.299 s
[INFO] Finished at: 2020-08-01T11:35:18+08:00
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.1:test (default-test) on project chapter2-5: There are test failures.
[ERROR] 
[ERROR] Please refer to G:\Workspaces\MyEclipse2017\SpringBoot-Learning\2.1.x\chapter2-5\target\surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.
[ERROR] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
yansheng836 added a commit to yansheng836/SpringBoot-Learning that referenced this issue Aug 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant