From 1e339c9e8e9924d2d44fb9a42b52392b4c7071ca Mon Sep 17 00:00:00 2001 From: javsanbel2 Date: Wed, 20 Nov 2024 13:47:28 +0100 Subject: [PATCH] cleanup 2 --- .../cleanup/service/PagingCleanupServiceTest.java | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/PagingCleanupServiceTest.java b/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/PagingCleanupServiceTest.java index 00279f22..c75b0d53 100644 --- a/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/PagingCleanupServiceTest.java +++ b/beekeeper-path-cleanup/src/test/java/com/expediagroup/beekeeper/path/cleanup/service/PagingCleanupServiceTest.java @@ -50,7 +50,6 @@ import com.google.common.collect.Lists; import com.expediagroup.beekeeper.cleanup.path.PathCleaner; -import com.expediagroup.beekeeper.core.checker.IcebergTableChecker; import com.expediagroup.beekeeper.core.model.HousekeepingPath; import com.expediagroup.beekeeper.core.model.HousekeepingStatus; import com.expediagroup.beekeeper.core.model.PeriodDuration; @@ -75,10 +74,9 @@ public class PagingCleanupServiceTest { private @Autowired HousekeepingPathRepository housekeepingPathRepository; private @MockBean PathCleaner pathCleaner; - private @MockBean IcebergTableChecker icebergTableChecker; @Test public void typicalWithPaging() { - UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner, icebergTableChecker); + UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner); pagingCleanupService = new PagingPathCleanupService(List.of(handler), 2, false); List paths = List.of("s3://bucket/some_foo", "s3://bucket/some_bar", "s3://bucket/some_foobar"); @@ -99,7 +97,7 @@ public void typicalWithPaging() { @Test public void mixOfScheduledAndFailedPaths() { - UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner, icebergTableChecker); + UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner); pagingCleanupService = new PagingPathCleanupService(List.of(handler), 2, false); List paths = List .of(createEntityHousekeepingPath("s3://bucket/some_foo", SCHEDULED), @@ -115,7 +113,7 @@ public void mixOfScheduledAndFailedPaths() { @Test public void mixOfAllPaths() { - UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner, icebergTableChecker); + UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner); pagingCleanupService = new PagingPathCleanupService(List.of(handler), 2, false); List paths = List .of(createEntityHousekeepingPath("s3://bucket/some_foo", SCHEDULED), @@ -132,7 +130,7 @@ public void mixOfAllPaths() { @Test void pathCleanerException() { - UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner, icebergTableChecker); + UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner); pagingCleanupService = new PagingPathCleanupService(List.of(handler), 2, false); doThrow(new RuntimeException("Error")).doNothing().when(pathCleaner).cleanupPath(any(HousekeepingPath.class)); @@ -160,7 +158,7 @@ void pathCleanerException() { @Test @Timeout(value = 10) void doNotInfiniteLoopOnRepeatedFailures() { - UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner, icebergTableChecker); + UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner); pagingCleanupService = new PagingPathCleanupService(List.of(handler), 1, false); List paths = List .of(createEntityHousekeepingPath("s3://bucket/some_foo", FAILED), @@ -188,7 +186,7 @@ void doNotInfiniteLoopOnRepeatedFailures() { @Test @Timeout(value = 10) void doNotInfiniteLoopOnDryRunCleanup() { - UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner, icebergTableChecker); + UnreferencedPathHandler handler = new UnreferencedPathHandler(housekeepingPathRepository, pathCleaner); pagingCleanupService = new PagingPathCleanupService(List.of(handler), 1, true); List paths = List .of(createEntityHousekeepingPath("s3://bucket/some_foo", SCHEDULED),