remove_debug_from_ro_flow_test (#2265)

This commit is contained in:
Avgustin Marinov
2025-02-07 13:53:28 +02:00
committed by GitHub
parent 0fc076aaca
commit 4ded430c39

View File

@@ -11,7 +11,6 @@ package org.eclipse.hawkbit.repository.jpa.management;
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.Feature;
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;
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 @@ import org.springframework.test.context.TestPropertySource;
*/
@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 @@ class RolloutManagementFlowTest extends AbstractJpaIntegrationTest {
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());