报错

提问
2 251

2 months ago

There are test failures.

Please refer to C:\Users\Administrator\Desktop\fast-boot-master\fast-server\target\surefire-reports for the individual test results.
Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream.

---------2--------
[INFO]
[INFO] ------------------------< net.maku:fast-server >------------------------
[INFO] Building fast-server 1.2.0 [6/6]
[INFO] --------------------------------[ jar ]---------------------------------
Downloading from public: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-maven-plugin/2.7.2/spring-boot-maven-plugin-2.7.2.pom
Downloaded from public: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-maven-plugin/2.7.2/spring-boot-maven-plugin-2.7.2.pom (3.1 kB at 7.1 kB/s)
Downloading from public: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-maven-plugin/2.7.2/spring-boot-maven-plugin-2.7.2.jar
Downloaded from public: https://maven.aliyun.com/repository/public/org/springframework/boot/spring-boot-maven-plugin/2.7.2/spring-boot-maven-plugin-2.7.2.jar (107 kB at 139 kB/s)
Downloading from public: https://maven.aliyun.com/repository/public/com/github/xiaoymin/knife4j-springdoc-ui/3.0.3/knife4j-springdoc-ui-3.0.3.jar
Downloaded from public: https://maven.aliyun.com/repository/public/com/github/xiaoymin/knife4j-springdoc-ui/3.0.3/knife4j-springdoc-ui-3.0.3.jar (2.9 MB at 235 kB/s)
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources) @ fast-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 4 resources
[INFO] Copying 9 resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @ fast-server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 1 source file to C:\Users\Administrator\Desktop\fast-boot-master\fast-server\target\classes
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources (default-testResources) @ fast-server ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory C:\Users\Administrator\Desktop\fast-boot-master\fast-server\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile (default-testCompile) @ fast-server ---
[INFO] Changes detected - recompiling the module!
[INFO] Compiling 2 source files to C:\Users\Administrator\Desktop\fast-boot-master\fast-server\target\test-classes
[INFO]
[INFO] --- maven-surefire-plugin:2.22.2:test (default-test) @ fast-server ---

回帖
ah00_  (楼主) 2 months ago

net.maku.FastTest.txt

Test set: net.maku.FastTest

Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 5.401 s - in net.maku.FastTest

net.maku.FileUploadTest.txt

Test set: net.maku.FileUploadTest

Tests run: 1, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.01 s <<< FAILURE! - in net.maku.FileUploadTest
uploadTest Time elapsed: 0.003 s <<< ERROR!
java.nio.file.NoSuchFileException: D:\upload\1.png
at net.maku.FileUploadTest.uploadTest(FileUploadTest.java:19)

回复
maku 2 months ago

配置一下,跳过单元测试,在pom.xml里面,添加如下内容

<properties>
	<skipTests>true</skipTests>
</properties>
回复
提交回复