From 4ded430c391f2fd78cbf43b6cc1c8ed7532fef0c Mon Sep 17 00:00:00 2001 From: Avgustin Marinov Date: Fri, 7 Feb 2025 13:53:28 +0200 Subject: [PATCH] remove_debug_from_ro_flow_test (#2265) --- .../management/RolloutManagementFlowTest.java | 37 +------------------ 1 file changed, 1 insertion(+), 36 deletions(-) diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementFlowTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementFlowTest.java index 96885ba916..f5e7c45560 100644 --- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementFlowTest.java +++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementFlowTest.java @@ -11,7 +11,6 @@ import static org.assertj.core.api.Assertions.assertThat; -import java.net.URI; import java.util.List; import java.util.concurrent.atomic.AtomicBoolean; @@ -20,7 +19,6 @@ import io.qameta.allure.Story; import org.eclipse.hawkbit.repository.OffsetBasedPageRequest; import org.eclipse.hawkbit.repository.builder.DynamicRolloutGroupTemplate; -import org.eclipse.hawkbit.repository.exception.CancelActionNotAllowedException; import org.eclipse.hawkbit.repository.jpa.AbstractJpaIntegrationTest; import org.eclipse.hawkbit.repository.jpa.model.JpaAction; import org.eclipse.hawkbit.repository.model.Action; @@ -29,14 +27,10 @@ import org.eclipse.hawkbit.repository.model.Rollout.RolloutStatus; import org.eclipse.hawkbit.repository.model.RolloutGroup; import org.eclipse.hawkbit.repository.model.RolloutGroup.RolloutGroupStatus; -import org.eclipse.hawkbit.repository.model.Target; -import org.eclipse.hawkbit.util.IpUtil; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.springframework.data.domain.Sort; import org.springframework.data.domain.Sort.Direction; -import org.springframework.http.HttpStatus; -import org.springframework.http.ResponseEntity; import org.springframework.test.context.TestPropertySource; /** @@ -44,13 +38,7 @@ */ @Feature("Component Tests - Repository") @Story("Rollout Management (Flow)") -@TestPropertySource(properties = { "hawkbit.server.repository.dynamicRolloutsMinInvolvePeriodMS=-1", - "logging.level.org.eclipse.persistence=DEBUG", - "spring.jpa.properties.eclipselink.logging.level=FINE", - "spring.jpa.properties.eclipselink.logging.level.sql=FINE", - "spring.jpa.properties.eclipselink.logging.parameters=true", - "logging.level.org.hibernate.SQL=TRACE", - "logging.level.org.hibernate.stat=TRACE"}) +@TestPropertySource(properties = { "hawkbit.server.repository.dynamicRolloutsMinInvolvePeriodMS=-1" }) class RolloutManagementFlowTest extends AbstractJpaIntegrationTest { @BeforeEach @@ -85,29 +73,6 @@ void rolloutFlow() { assertGroup(groups.get(i), false, i == 0 ? RolloutGroupStatus.RUNNING : RolloutGroupStatus.SCHEDULED, 3); } - System.out.println("--------------------------"); - final String controllerId = targetPrefix + 1; - final Target target = controllerManagement.findOrRegisterTargetIfItDoesNotExist(controllerId, URI.create("http://***")); - System.out.println("--------------------------1"); - final Action activeAction = controllerManagement.findActiveActionWithHighestWeight(controllerId).orElse(null); - System.out.println("--------------------------2"); - final Action installedAction = controllerManagement.getInstalledActionByTarget(target).orElse(null); - System.out.println("--------------------------3"); - - if (activeAction != null && activeAction.hasMaintenanceSchedule() && activeAction.isMaintenanceScheduleLapsed()) { - try { - controllerManagement.cancelAction(activeAction); - System.out.println("--------------------------4"); - } catch (final CancelActionNotAllowedException e) { - e.printStackTrace(); - } - } - - var t = activeAction == null - ? controllerManagement.getPollingTime() - : controllerManagement.getPollingTimeForAction(activeAction); - System.out.println("--------------------------"); - executeStaticWithoutOneTargetFromTheLastGroupAndHandleAll(groups, rollout, amountGroups); rolloutManagement.pauseRollout(rollout.getId());