Skip to content

Commit

Permalink
test-fileServer-解决测试报错
Browse files Browse the repository at this point in the history
  • Loading branch information
Ning19230223 committed Oct 24, 2024
1 parent b1b69af commit 86eeb12
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void testCRUD() throws IOException, InterruptedException {
String filePathWithO = config.uploadPath() + id + "-o";
Path pathN = Paths.get(filePathWithN);
Path pathO = Paths.get(filePathWithO);
Thread.sleep(1000);
Thread.sleep(2000);
assertTrue(Files.exists(pathN));
assertTrue(Files.exists(pathO));

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ void testFileDownload() throws InterruptedException {
String id = service.save(tempFile, fileName).split("@")[0];
Thread.sleep(1000);
File file = service.get(id);
String filePath = file.getAbsolutePath();
String filePath = file.getPath();
System.out.println(filePath);
// 错误原因: 目标目录中已经存在了同名文件,导致无法创建目标文件的副本
File file2 = service.get(id);
String filePath2 = file2.getAbsolutePath();
String filePath2 = file2.getPath();
System.out.println(filePath2);
}

Expand Down

0 comments on commit 86eeb12

Please sign in to comment.