From cb18e7c79b3429db2a0f6aadc125ec48c3d40f0f Mon Sep 17 00:00:00 2001 From: Sweidan Omar Date: Fri, 21 Jan 2022 02:04:16 +0000 Subject: [PATCH] git-tfs-id: [http://tfs.userrendszerhaz.hu:8080/tfs/DefaultCollection]$/MediaCube;C32841 --- .../LOCAL/jobs/steps/IntegrationTestStep.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/server/-product/production/LOCAL/jobs/steps/IntegrationTestStep.java b/server/-product/production/LOCAL/jobs/steps/IntegrationTestStep.java index 317edfed..9d1838cd 100644 --- a/server/-product/production/LOCAL/jobs/steps/IntegrationTestStep.java +++ b/server/-product/production/LOCAL/jobs/steps/IntegrationTestStep.java @@ -50,7 +50,7 @@ public class IntegrationTestStep extends JobStep { finishLatch.await(); Path output = Paths.get("/mediacube/data", archivedMedia.getMedia().getHouseId(), archivedMedia.getMedia().getHouseId() + "-ARCH-" + archivedMedia.getMedia().getMediaFileRealName()); - if (!output.toFile().exists()) + if (!Files.exists(output)) throw new Exception("File not exists: " + output); logger.info("_01_test_retrieve_ondemand SUCCESS"); @@ -61,13 +61,13 @@ public class IntegrationTestStep extends JobStep { archivedMedia.getMedia().getHouseId() + "-ARCH-" + archivedMedia.getMedia().getMediaFileRealName()); String outputName = "IntegrationTest_" + System.currentTimeMillis() + ".mxf"; - Path ouptput = Paths.get(input.getParent().toString(), outputName); - Files.copy(input, ouptput); - if (!ouptput.toFile().exists()) - throw new Exception("File not exists: " + ouptput); + Path output = Paths.get(input.getParent().toString(), outputName); + Files.copy(input, output); + if (!Files.exists(output)) + throw new Exception("File not exists: " + output); ArchiveItem archiveItem = new ArchiveItem(); - archiveItem.setMediaFile(ouptput.toString()); + archiveItem.setMediaFile(output.toString()); archiveItem.setItemHouseId(outputName); archiveItem.setItemTitle(outputName); archiveItem.setMediaHouseId(outputName); @@ -81,10 +81,10 @@ public class IntegrationTestStep extends JobStep { }, "archive-material.xml", "Test archive-material", ListUtils.asMap("archiveItem", archiveItem, "killDateDays", 0)); finishLatch.await(); - if (!ItemManagerExtensions.isArchived(getManager(), ouptput)) - throw new Exception("File not archived: " + ouptput); + if (!ItemManagerExtensions.isArchived(getManager(), output)) + throw new Exception("File not archived: " + output); - Files.delete(ouptput); + Files.delete(output); logger.info("_02_test_archive_material SUCCESS"); } @@ -101,7 +101,7 @@ public class IntegrationTestStep extends JobStep { }, "delete-materials.xml", "Test delete-materials", ListUtils.asMap("sourcePath", source, "skipArchiveCheck", true)); finishLatch.await(); - if (output.toFile().exists()) + if (Files.exists(output)) throw new Exception("File exists: " + output); } -- 2.54.0