Skip to content

Commit

Permalink
remove_debug_from_ro_flow_test (#2265)
Browse files Browse the repository at this point in the history
  • Loading branch information
avgustinmm authored Feb 7, 2025
1 parent 0fc076a commit 4ded430
Showing 1 changed file with 1 addition and 36 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand All @@ -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;
Expand All @@ -29,28 +27,18 @@
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;

/**
* Junit tests for RolloutManagement.
*/
@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
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit 4ded430

Please sign in to comment.