Update misc dependencies versions

+ remove org.bsc.maven:maven-processor-plugin
+ awaitility removal of awaitility Duration class fixed

Signed-off-by: Marinov Avgustin <Avgustin.Marinov@bosch.com>
This commit is contained in:
Marinov Avgustin
2023-06-28 12:37:14 +03:00
parent 5a5c615cac
commit 8047ceac03
9 changed files with 47 additions and 41 deletions

View File

@@ -77,8 +77,8 @@ public class JpaAutoConfirmationStatus extends AbstractJpaTenantAwareBaseEntity
final String remarkMessage = StringUtils.hasText(remark) ? remark : "n/a"; final String remarkMessage = StringUtils.hasText(remark) ? remark : "n/a";
final String formattedInitiator = StringUtils.hasText(initiator) ? initiator : "n/a"; final String formattedInitiator = StringUtils.hasText(initiator) ? initiator : "n/a";
final String createdByRolloutsUser = StringUtils.hasText(getCreatedBy()) ? getCreatedBy() : "n/a"; final String createdByRolloutsUser = StringUtils.hasText(getCreatedBy()) ? getCreatedBy() : "n/a";
return String.format("Assignment automatically confirmed by initiator '%s'. %n%n" // return String.format("Assignment automatically confirmed by initiator '%s'. \n\n" //
+ "Auto confirmation activated by system user: '%s' %n%n" // + "Auto confirmation activated by system user: '%s' \n\n" //
+ "Remark: %s", formattedInitiator, createdByRolloutsUser, remarkMessage); + "Remark: %s", formattedInitiator, createdByRolloutsUser, remarkMessage);
} }

View File

@@ -11,7 +11,6 @@ package org.eclipse.hawkbit.repository.jpa;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.repository.jpa.model.JpaAction; import org.eclipse.hawkbit.repository.jpa.model.JpaAction;
import org.eclipse.hawkbit.repository.model.Action.ActionType; import org.eclipse.hawkbit.repository.model.Action.ActionType;
import org.junit.jupiter.api.Test; import org.junit.jupiter.api.Test;
@@ -20,6 +19,8 @@ import io.qameta.allure.Description;
import io.qameta.allure.Feature; import io.qameta.allure.Feature;
import io.qameta.allure.Story; import io.qameta.allure.Story;
import java.time.Duration;
@Feature("Unit Tests - Repository") @Feature("Unit Tests - Repository")
@Story("Deployment Management") @Story("Deployment Management")
public class ActionTest { public class ActionTest {
@@ -37,7 +38,7 @@ public class ActionTest {
assertThat(timeforcedAction.isForcedOrTimeForced()).isFalse(); assertThat(timeforcedAction.isForcedOrTimeForced()).isFalse();
// wait until timeforce time is hit // wait until timeforce time is hit
Awaitility.await().atMost(Duration.TWO_SECONDS).pollInterval(Duration.ONE_HUNDRED_MILLISECONDS) Awaitility.await().atMost(Duration.ofSeconds(2)).pollInterval(Duration.ofMillis(100))
.until(timeforcedAction::isForcedOrTimeForced); .until(timeforcedAction::isForcedOrTimeForced);
} }
} }

View File

@@ -14,11 +14,11 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doAnswer;
import static org.mockito.Mockito.mock; import static org.mockito.Mockito.mock;
import java.time.Duration;
import java.util.Collections; import java.util.Collections;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.repository.exception.StopRolloutException; import org.eclipse.hawkbit.repository.exception.StopRolloutException;
import org.eclipse.hawkbit.repository.jpa.model.JpaRolloutGroup; import org.eclipse.hawkbit.repository.jpa.model.JpaRolloutGroup;
import org.eclipse.hawkbit.repository.model.Action.ActionType; import org.eclipse.hawkbit.repository.model.Action.ActionType;
@@ -94,8 +94,8 @@ public class ConcurrentDistributionSetInvalidationTest extends AbstractJpaIntegr
// wait until at least one RolloutGroup is created, as this means that // wait until at least one RolloutGroup is created, as this means that
// the thread has started and has acquired the lock // the thread has started and has acquired the lock
Awaitility.await().atMost(Duration.FIVE_SECONDS) Awaitility.await().atMost(Duration.ofSeconds(5))
.pollInterval(Duration.ONE_HUNDRED_MILLISECONDS) .pollInterval(Duration.ofMillis(100))
.until(() -> tenantAware.runAsTenant(tenant, () -> systemSecurityContext .until(() -> tenantAware.runAsTenant(tenant, () -> systemSecurityContext
.runAsSystem(() -> rolloutGroupManagement.findByRollout(PAGE, rollout.getId()).getSize() > 0))); .runAsSystem(() -> rolloutGroupManagement.findByRollout(PAGE, rollout.getId()).getSize() > 0)));

View File

@@ -11,6 +11,7 @@ package org.eclipse.hawkbit.repository.jpa;
import static org.assertj.core.api.Assertions.assertThat; import static org.assertj.core.api.Assertions.assertThat;
import static org.assertj.core.api.Assertions.assertThatExceptionOfType; import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
import java.time.Duration;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
@@ -31,7 +32,6 @@ import org.apache.commons.lang3.RandomStringUtils;
import org.assertj.core.api.Assertions; import org.assertj.core.api.Assertions;
import org.assertj.core.api.Condition; import org.assertj.core.api.Condition;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.repository.Identifiable; import org.eclipse.hawkbit.repository.Identifiable;
import org.eclipse.hawkbit.repository.OffsetBasedPageRequest; import org.eclipse.hawkbit.repository.OffsetBasedPageRequest;
import org.eclipse.hawkbit.repository.builder.RolloutCreate; import org.eclipse.hawkbit.repository.builder.RolloutCreate;
@@ -2221,7 +2221,7 @@ class RolloutManagementTest extends AbstractJpaIntegrationTest {
} }
private void awaitRunningState(final Long myRolloutId) { private void awaitRunningState(final Long myRolloutId) {
Awaitility.await().atMost(Duration.TEN_SECONDS).pollInterval(Duration.FIVE_HUNDRED_MILLISECONDS).with() Awaitility.await().atMost(Duration.ofSeconds(10)).pollInterval(Duration.ofMillis(500)).with()
.until(() -> WithSpringAuthorityRule .until(() -> WithSpringAuthorityRule
.runAsPrivileged( .runAsPrivileged(
() -> rolloutManagement.get(myRolloutId).orElseThrow(NoSuchElementException::new)) () -> rolloutManagement.get(myRolloutId).orElseThrow(NoSuchElementException::new))

View File

@@ -18,6 +18,7 @@ import static org.springframework.test.web.servlet.request.MockMvcRequestBuilder
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import java.time.Duration;
import java.util.Collections; import java.util.Collections;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
@@ -25,7 +26,6 @@ import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtActionRestApi; import org.eclipse.hawkbit.mgmt.rest.api.MgmtActionRestApi;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRepresentationMode; import org.eclipse.hawkbit.mgmt.rest.api.MgmtRepresentationMode;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants; import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants;
@@ -445,7 +445,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
.getAssignedEntity().stream().map(Action::getTarget).collect(Collectors.toList()); .getAssignedEntity().stream().map(Action::getTarget).collect(Collectors.toList());
// 2nd update // 2nd update
// sleep 10ms to ensure that we can sort by reportedAt // sleep 10ms to ensure that we can sort by reportedAt
Awaitility.await().atMost(Duration.ONE_HUNDRED_MILLISECONDS).atLeast(5, TimeUnit.MILLISECONDS) Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
.pollInterval(10, TimeUnit.MILLISECONDS) .pollInterval(10, TimeUnit.MILLISECONDS)
.until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L)); .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSet(two, updatedTargets); assignDistributionSet(two, updatedTargets);
@@ -455,7 +455,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
.map(Action::getTarget).collect(Collectors.toList()); .map(Action::getTarget).collect(Collectors.toList());
// 2nd update // 2nd update
// sleep 10ms to ensure that we can sort by reportedAt // sleep 10ms to ensure that we can sort by reportedAt
Awaitility.await().atMost(Duration.ONE_HUNDRED_MILLISECONDS).atLeast(5, TimeUnit.MILLISECONDS) Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
.pollInterval(10, TimeUnit.MILLISECONDS) .pollInterval(10, TimeUnit.MILLISECONDS)
.until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L)); .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule, assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule,

View File

@@ -23,6 +23,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
import java.util.List; import java.util.List;
import java.util.NoSuchElementException; import java.util.NoSuchElementException;
@@ -31,7 +32,6 @@ import java.util.stream.Collectors;
import java.util.stream.Stream; import java.util.stream.Stream;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.exception.SpServerError; import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants; import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants;
import org.eclipse.hawkbit.repository.RolloutGroupManagement; import org.eclipse.hawkbit.repository.RolloutGroupManagement;
@@ -1097,7 +1097,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
} }
private void awaitRunningState(final Long rolloutId) { private void awaitRunningState(final Long rolloutId) {
Awaitility.await().atMost(Duration.ONE_MINUTE).pollInterval(Duration.ONE_HUNDRED_MILLISECONDS).with() Awaitility.await().atMost(Duration.ofMinutes(1)).pollInterval(Duration.ofMillis(100)).with()
.until(() -> WithSpringAuthorityRule .until(() -> WithSpringAuthorityRule
.runAsPrivileged( .runAsPrivileged(
() -> rolloutManagement.get(rolloutId).orElseThrow(NoSuchElementException::new)) () -> rolloutManagement.get(rolloutId).orElseThrow(NoSuchElementException::new))

View File

@@ -29,6 +29,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import java.io.ByteArrayInputStream; import java.io.ByteArrayInputStream;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.List; import java.util.List;
@@ -38,7 +39,6 @@ import java.util.concurrent.TimeUnit;
import org.apache.commons.io.IOUtils; import org.apache.commons.io.IOUtils;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.exception.SpServerError; import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.mgmt.json.model.artifact.MgmtArtifact; import org.eclipse.hawkbit.mgmt.json.model.artifact.MgmtArtifact;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants; import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants;
@@ -122,7 +122,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
// ensures that we are not to fast so that last modified is not set correctly // ensures that we are not to fast so that last modified is not set correctly
Awaitility.await() Awaitility.await()
.atMost(Duration.ONE_HUNDRED_MILLISECONDS) .atMost(Duration.ofMillis(100))
.pollInterval(10L, TimeUnit.MILLISECONDS) .pollInterval(10L, TimeUnit.MILLISECONDS)
.until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null); .until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
@@ -162,7 +162,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
// ensures that we are not to fast so that last modified is not set correctly // ensures that we are not to fast so that last modified is not set correctly
Awaitility.await() Awaitility.await()
.atMost(Duration.ONE_HUNDRED_MILLISECONDS) .atMost(Duration.ofMillis(100))
.pollInterval(10L, TimeUnit.MILLISECONDS) .pollInterval(10L, TimeUnit.MILLISECONDS)
.until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null); .until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);

View File

@@ -26,6 +26,7 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import java.time.Duration;
import java.util.Arrays; import java.util.Arrays;
import java.util.Collections; import java.util.Collections;
import java.util.Comparator; import java.util.Comparator;
@@ -43,7 +44,6 @@ import javax.validation.ConstraintViolationException;
import org.apache.commons.lang3.RandomStringUtils; import org.apache.commons.lang3.RandomStringUtils;
import org.awaitility.Awaitility; import org.awaitility.Awaitility;
import org.awaitility.Duration;
import org.eclipse.hawkbit.exception.SpServerError; import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.im.authentication.SpPermission; import org.eclipse.hawkbit.im.authentication.SpPermission;
import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType; import org.eclipse.hawkbit.mgmt.json.model.distributionset.MgmtActionType;
@@ -1263,7 +1263,7 @@ class MgmtTargetResourceTest extends AbstractManagementApiIntegrationTest {
.getAssignedEntity().stream().map(Action::getTarget).collect(Collectors.toList()); .getAssignedEntity().stream().map(Action::getTarget).collect(Collectors.toList());
// 2nd update // 2nd update
// sleep 10ms to ensure that we can sort by reportedAt // sleep 10ms to ensure that we can sort by reportedAt
Awaitility.await().atMost(Duration.ONE_HUNDRED_MILLISECONDS).atLeast(5, TimeUnit.MILLISECONDS) Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
.pollInterval(10, TimeUnit.MILLISECONDS) .pollInterval(10, TimeUnit.MILLISECONDS)
.until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L)); .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSet(two, updatedTargets); assignDistributionSet(two, updatedTargets);
@@ -1273,7 +1273,7 @@ class MgmtTargetResourceTest extends AbstractManagementApiIntegrationTest {
.map(Action::getTarget).collect(Collectors.toList()); .map(Action::getTarget).collect(Collectors.toList());
// 2nd update // 2nd update
// sleep 10ms to ensure that we can sort by reportedAt // sleep 10ms to ensure that we can sort by reportedAt
Awaitility.await().atMost(Duration.ONE_HUNDRED_MILLISECONDS).atLeast(5, TimeUnit.MILLISECONDS) Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
.pollInterval(10, TimeUnit.MILLISECONDS) .pollInterval(10, TimeUnit.MILLISECONDS)
.until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L)); .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule, assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule,

47
pom.xml
View File

@@ -147,13 +147,21 @@
<mariadb.version>2.7.8</mariadb.version> <mariadb.version>2.7.8</mariadb.version>
<!-- CVE-2020-36518, CVE-2022-42003, CVE-2022-42004 --> <!-- CVE-2020-36518, CVE-2022-42003, CVE-2022-42004 -->
<jackson-bom.version>2.14.2</jackson-bom.version> <jackson-bom.version>2.14.2</jackson-bom.version>
<!-- Spring boot version overrides - END -->
<!-- SONATYPE-2021-1175 -->
<logback.version>1.2.9</logback.version>
<!-- CVE-2022-31690 --> <!-- CVE-2022-31690 -->
<spring-security-oauth2-client.version>5.7.7</spring-security-oauth2-client.version> <spring-security-oauth2-client.version>5.7.7</spring-security-oauth2-client.version>
<!-- Spring boot version overrides - END -->
<rabbitmq.http-client.version>3.12.1</rabbitmq.http-client.version> <rabbitmq.http-client.version>3.12.1</rabbitmq.http-client.version>
<!-- Eclipselink - START -->
<eclipselink.version>2.7.11</eclipselink.version>
<eclipselink.maven.plugin.version>2.7.9.1</eclipselink.maven.plugin.version>
<!-- Eclipselink - END -->
<!-- Vaadin versions - START --> <!-- Vaadin versions - START -->
<!-- Vaadin version 8.14.3 is the last version running under an Apache 2.0 license --> <!-- Vaadin version 8.14.3 is the last version running under an Apache 2.0 license -->
<vaadin.version>8.14.3</vaadin.version> <vaadin.version>8.14.3</vaadin.version>
@@ -181,35 +189,32 @@
</docker.jvm.args> </docker.jvm.args>
<docker.jre.version>17.0.7_7-jre-alpine</docker.jre.version> <docker.jre.version>17.0.7_7-jre-alpine</docker.jre.version>
<!-- Docker image build - END --> <!-- Docker image build - END -->
<maven.processor.plugin.version>3.3.3</maven.processor.plugin.version>
<maven.scm.plugin.version>1.11.1</maven.scm.plugin.version> <maven.scm.plugin.version>2.0.1</maven.scm.plugin.version>
<maven.site.plugin.version>3.9.1</maven.site.plugin.version> <maven.site.plugin.version>3.12.1</maven.site.plugin.version>
<maven.surefire.plugin.version>3.0.0-M7</maven.surefire.plugin.version> <maven.surefire.plugin.version>3.1.2</maven.surefire.plugin.version>
<maven.failsafe.plugin.version>3.0.0-M7</maven.failsafe.plugin.version> <maven.failsafe.plugin.version>3.1.2</maven.failsafe.plugin.version>
<maven.enforcer.plugin.version>3.1.0</maven.enforcer.plugin.version> <maven.enforcer.plugin.version>3.3.0</maven.enforcer.plugin.version>
<!-- ************************ --> <!-- ************************ -->
<!-- Maven Surefire settings --> <!-- Maven Surefire settings -->
<!-- ************************ --> <!-- ************************ -->
<surefire.forkcount>1</surefire.forkcount> <surefire.forkcount>1</surefire.forkcount>
<!-- Misc libraries versions - START --> <!-- Misc libraries versions - START -->
<cron-utils.version>9.1.6</cron-utils.version> <cron-utils.version>9.2.1</cron-utils.version>
<jsoup.version>1.15.3</jsoup.version> <jsoup.version>1.16.1</jsoup.version>
<allure.version>2.13.10</allure.version>
<eclipselink.version>2.7.11</eclipselink.version>
<eclipselink.maven.plugin.version>2.7.9.1</eclipselink.maven.plugin.version>
<jaxb-api.version>2.3.1</jaxb-api.version> <jaxb-api.version>2.3.1</jaxb-api.version>
<gwtmockito.version>1.1.8</gwtmockito.version> <guava.version>32.0.1-jre</guava.version>
<guava.version>30.1.1-jre</guava.version> <javax.el-api.version>3.0.0</javax.el-api.version>
<javax.el-api.version>2.2.4</javax.el-api.version> <corn-cps.version>1.1.10</corn-cps.version>
<corn-cps.version>1.1.7</corn-cps.version> <commons-io.version>2.13.0</commons-io.version>
<commons-io.version>2.11.0</commons-io.version>
<rsql-parser.version>2.1.0</rsql-parser.version> <rsql-parser.version>2.1.0</rsql-parser.version>
<awaitility.version>3.1.2</awaitility.version> <io-protostuff.version>1.8.0</io-protostuff.version>
<io-protostuff.version>1.5.6</io-protostuff.version>
<!-- test -->
<allure.version>2.22.2</allure.version>
<awaitility.version>4.2.0</awaitility.version>
<!-- SONATYPE-2021-1175 -->
<logback.version>1.2.9</logback.version>
<!-- Misc libraries versions - END --> <!-- Misc libraries versions - END -->
<!-- Release - START --> <!-- Release - START -->