简而言之,由于我在测试类中有读文件的操作,但是文件已经被删掉了,导致Maven打包时测试不通过。
@Test
public void getFileMd5() throws IOException {
File testFile = new File("F:\\minio测试\\ppt演示.mp4");
FileInputStream fileInputStream = new FileInputStream(testFile);
String testFileMD5 = DigestUtils.md5Hex(fileInputStream);
System.out.println(testFileMD5);
}
解决方案:点击跳过测试按钮,跳过测试即可。