diff --git a/hawkbit-artifact/hawkbit-artifact-api/src/test/java/org/eclipse/hawkbit/artifact/repository/urlhandler/PropertyBasedArtifactUrlHandlerTest.java b/hawkbit-artifact/hawkbit-artifact-api/src/test/java/org/eclipse/hawkbit/artifact/repository/urlhandler/PropertyBasedArtifactUrlHandlerTest.java
index 632affc64..ba813c036 100644
--- a/hawkbit-artifact/hawkbit-artifact-api/src/test/java/org/eclipse/hawkbit/artifact/repository/urlhandler/PropertyBasedArtifactUrlHandlerTest.java
+++ b/hawkbit-artifact/hawkbit-artifact-api/src/test/java/org/eclipse/hawkbit/artifact/repository/urlhandler/PropertyBasedArtifactUrlHandlerTest.java
@@ -24,7 +24,7 @@ import org.mockito.junit.jupiter.MockitoExtension;
/**
* Tests for creating urls to download artifacts.
- *
+ *
* Feature: Unit Tests - Artifact URL Handler
* Story: Test to generate the artifact download URL
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionFeedbackTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionFeedbackTest.java
index 1b70f1d95..62479f71d 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionFeedbackTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionFeedbackTest.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serialization of DDI api model 'DdiActionFeedback'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serialization of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionHistoryTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionHistoryTest.java
index 89ec7bf11..417d040e4 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionHistoryTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiActionHistoryTest.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiActionHistory'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHashTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHashTest.java
index a71dd6d05..9a587965b 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHashTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactHashTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiArtifactHash'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactTest.java
index 667959571..4cc19b297 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiArtifactTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiArtifact'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelActionToStopTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelActionToStopTest.java
index b6513dafc..e7d3003cc 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelActionToStopTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelActionToStopTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiCancelActionToStop'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelTest.java
index 675b4a06b..d388e1319 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiCancelTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiArtifact'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiChunkTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiChunkTest.java
index 004627bfe..970b269fe 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiChunkTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiChunkTest.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiChunk'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigDataTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigDataTest.java
index 28602ea2b..901ff7594 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigDataTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigDataTest.java
@@ -23,7 +23,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiConfigData'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigTest.java
index aab6220e3..209ff10ce 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfigTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiConfig'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfirmationBaseTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfirmationBaseTest.java
index 074b1b5c6..7e2e4033b 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfirmationBaseTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiConfirmationBaseTest.java
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiConfirmationBase'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: CHeck JSON serialization of DDI api confirmation models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiControllerBaseTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiControllerBaseTest.java
index 0a0fed698..189289a6d 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiControllerBaseTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiControllerBaseTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiControllerBase'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentBaseTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentBaseTest.java
index 791aa72e9..566d1021c 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentBaseTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentBaseTest.java
@@ -26,7 +26,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiDeploymentBase'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentTest.java
index 3798eb489..6d7b2cbee 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiDeploymentTest.java
@@ -25,7 +25,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiDeployment'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiMetadataTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiMetadataTest.java
index 7e70ba706..870e15e4d 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiMetadataTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiMetadataTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiMetadata'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiPollingTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiPollingTest.java
index 7a09c8283..42d3b7f8f 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiPollingTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiPollingTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiPolling'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiProgressTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiProgressTest.java
index f8e8de752..f77620258 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiProgressTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiProgressTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiProgress'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiResultTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiResultTest.java
index 7c51e8016..1fb211e51 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiResultTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiResultTest.java
@@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
/**
* Test serializability of DDI api model 'DdiResult'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiStatusTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiStatusTest.java
index ecd4458da..732bc1a3b 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiStatusTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/DdiStatusTest.java
@@ -28,7 +28,7 @@ import org.junit.jupiter.params.provider.MethodSource;
/**
* Test serializability of DDI api model 'DdiStatus'
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serializability of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/JsonIgnorePropertiesAnnotationTest.java b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/JsonIgnorePropertiesAnnotationTest.java
index 76b5b4dbc..973c0476c 100644
--- a/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/JsonIgnorePropertiesAnnotationTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-api/src/test/java/org/eclipse/hawkbit/ddi/json/model/JsonIgnorePropertiesAnnotationTest.java
@@ -22,7 +22,7 @@ import org.junit.jupiter.api.Test;
/**
* Check DDI api model classes for '@JsonIgnoreProperties' annotation
- *
+ *
* Feature: Unit Tests - Direct Device Integration API
* Story: Serialization of DDI api Models
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java
index bc2160713..77a5c9867 100644
--- a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiArtifactDownloadTest.java
@@ -50,7 +50,7 @@ import org.springframework.test.web.servlet.MvcResult;
/**
* Test artifact downloads from the controller.
- *
+ *
* Feature: Component Tests - Direct Device Integration API
* Story: Artifact Download Resource
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java
index e89355b9d..c304a5dc5 100644
--- a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiCancelActionTest.java
@@ -43,7 +43,7 @@ import org.springframework.integration.json.JsonPathUtils;
/**
* Test cancel action from the controller.
- *
+ *
* Feature: Component Tests - Direct Device Integration API
* Story: Cancel Action Resource
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfirmationBaseTest.java b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfirmationBaseTest.java
index 1deb91b6d..720d9b019 100644
--- a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfirmationBaseTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiConfirmationBaseTest.java
@@ -59,7 +59,7 @@ import org.springframework.test.web.servlet.ResultActions;
/**
* Test confirmation base from the controller.
- *
+ *
* Feature: Component Tests - Direct Device Integration API
* Story: Confirmation Action Resource
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java
index aac924196..062a7cfaf 100644
--- a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiDeploymentBaseTest.java
@@ -67,7 +67,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
/**
* Test deployment base from the controller.
- *
+ *
* Feature: Component Tests - Direct Device Integration API
* Story: Deployment Action Resource
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiInstalledBaseTest.java b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiInstalledBaseTest.java
index 795b1723d..7fa36ec6e 100644
--- a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiInstalledBaseTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiInstalledBaseTest.java
@@ -63,7 +63,7 @@ import org.springframework.test.web.servlet.request.MockMvcRequestBuilders;
/**
* Test installed base from the controller.
- *
+ *
* Feature: Component Tests - Direct Device Integration API
* Story: Installed Base Resource
*/
diff --git a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java
index 918f11043..fecf0af43 100644
--- a/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java
+++ b/hawkbit-ddi/hawkbit-ddi-resource/src/test/java/org/eclipse/hawkbit/ddi/rest/resource/DdiRootControllerTest.java
@@ -69,7 +69,7 @@ import org.springframework.test.web.servlet.ResultActions;
/**
* Test the root controller resources.
- *
+ *
* Feature: Component Tests - Direct Device Integration API
* Story: Root Poll Resource
*/
diff --git a/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AbstractAmqpServiceIntegrationTest.java b/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AbstractAmqpServiceIntegrationTest.java
index c6039e6c0..b87d879bc 100644
--- a/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AbstractAmqpServiceIntegrationTest.java
+++ b/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AbstractAmqpServiceIntegrationTest.java
@@ -93,10 +93,7 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
}
protected T waitUntilIsPresent(final Callable> callable) {
-
- createConditionFactory()
- .until(() -> SecurityContextSwitch.runAsPrivileged(() -> callable.call().isPresent()));
-
+ await().until(() -> SecurityContextSwitch.runAsPrivileged(() -> callable.call().isPresent()));
try {
return SecurityContextSwitch.runAsPrivileged(() -> callable.call().get());
} catch (final Exception e) {
@@ -105,8 +102,8 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
}
protected void waitUntilEventMessagesAreDispatchedToTarget(final EventTopic... eventTopics) {
- createConditionFactory().untilAsserted(() -> assertThat(replyToListener.getLatestEventMessageTopics())
- .containsExactlyInAnyOrderElementsOf(Arrays.asList(eventTopics)));
+ await().untilAsserted(() ->
+ assertThat(replyToListener.getLatestEventMessageTopics()).containsExactlyInAnyOrderElementsOf(Arrays.asList(eventTopics)));
replyToListener.resetLatestEventMessageTopics();
}
@@ -188,8 +185,8 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
}
- protected void assertDmfDownloadAndUpdateRequest(final DmfDownloadAndUpdateRequest request,
- final Set softwareModules, final String controllerId) {
+ protected void assertDmfDownloadAndUpdateRequest(
+ final DmfDownloadAndUpdateRequest request, final Set softwareModules, final String controllerId) {
assertSoftwareModules(softwareModules, request.getSoftwareModules());
final Target updatedTarget = waitUntilIsPresent(() -> targetManagement.getByControllerID(controllerId));
assertThat(updatedTarget).isNotNull();
@@ -217,8 +214,7 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
}
protected void verifyReplyToListener() {
- createConditionFactory()
- .untilAsserted(() -> Mockito.verify(replyToListener, Mockito.atLeast(1)).handleMessage(Mockito.any()));
+ await().untilAsserted(() -> Mockito.verify(replyToListener, Mockito.atLeast(1)).handleMessage(Mockito.any()));
}
protected Long cancelAction(final Long actionId, final String controllerId) {
@@ -369,8 +365,7 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
protected void assertUpdateAttributes(final String controllerId, final Map attributes) {
waitUntilIsPresent(() -> controllerManagement.getByControllerId(controllerId));
-
- createConditionFactory().untilAsserted(() -> {
+ await().untilAsserted(() -> {
try {
final Map controllerAttributes = SecurityContextSwitch.runAsPrivileged(
() -> targetManagement.getControllerAttributes(controllerId));
@@ -416,16 +411,14 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
assertConfirmRequest(confirmRequest, dsModules, controllerId);
}
- protected void assertConfirmRequest(final DmfConfirmRequest request, final Set softwareModules,
- final String controllerId) {
+ protected void assertConfirmRequest(final DmfConfirmRequest request, final Set softwareModules, final String controllerId) {
assertSoftwareModules(softwareModules, request.getSoftwareModules());
final Target updatedTarget = waitUntilIsPresent(() -> targetManagement.getByControllerID(controllerId));
assertThat(updatedTarget).isNotNull();
assertThat(updatedTarget.getSecurityToken()).isEqualTo(request.getTargetSecurityToken());
}
- private void assertAssignmentMessage(final Set dsModules, final String controllerId,
- final EventTopic topic) {
+ private void assertAssignmentMessage(final Set dsModules, final String controllerId, final EventTopic topic) {
final Message replyMessage = assertReplyMessageHeader(topic, controllerId);
assertAllTargetsCount(1);
@@ -435,7 +428,8 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
assertDmfDownloadAndUpdateRequest(downloadAndUpdateRequest, dsModules, controllerId);
}
- private void registerAndAssertTargetWithExistingTenant(final String controllerId, final String name,
+ private void registerAndAssertTargetWithExistingTenant(
+ final String controllerId, final String name,
final int existingTargetsAfterCreation, final TargetUpdateStatus expectedTargetStatus,
final String createdBy, final Map attributes,
final Callable> fetchTarget) {
@@ -443,8 +437,9 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
final Target registeredTarget = waitUntilIsPresent(fetchTarget::call);
assertAllTargetsCount(existingTargetsAfterCreation);
assertThat(registeredTarget).isNotNull();
- assertTarget(registeredTarget, name != null ? name : controllerId, expectedTargetStatus, createdBy,
- attributes != null ? attributes : Collections.emptyMap());
+ assertTarget(
+ registeredTarget, name != null ? name : controllerId, expectedTargetStatus,
+ createdBy, attributes != null ? attributes : Collections.emptyMap());
}
private Optional findTargetBasedOnNewVersion(final String controllerId, final int version) {
@@ -455,7 +450,8 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
return Optional.empty();
}
- private void assertTarget(final Target target, final String name, final TargetUpdateStatus updateStatus,
+ private void assertTarget(
+ final Target target, final String name, final TargetUpdateStatus updateStatus,
final String createdBy, final Map attributes) {
assertThat(target.getTenant()).isEqualTo(TENANT_EXIST);
assertThat(target.getName()).isEqualTo(name);
@@ -463,9 +459,7 @@ abstract class AbstractAmqpServiceIntegrationTest extends AbstractAmqpIntegratio
assertThat(target.getDescription()).contains(target.getControllerId());
assertThat(target.getCreatedBy()).isEqualTo(createdBy);
assertThat(target.getUpdateStatus()).isEqualTo(updateStatus);
- assertThat(target.getAddress())
- .isEqualTo(IpUtil.createAmqpUri(getVirtualHost(), DmfTestConfiguration.REPLY_TO_EXCHANGE));
+ assertThat(target.getAddress()).isEqualTo(IpUtil.createAmqpUri(getVirtualHost(), DmfTestConfiguration.REPLY_TO_EXCHANGE));
assertThat(targetManagement.getControllerAttributes(target.getControllerId())).isEqualTo(attributes);
}
-
-}
+}
\ No newline at end of file
diff --git a/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java b/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java
index 5f3936e43..85cd8f72a 100644
--- a/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java
+++ b/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageDispatcherServiceIntegrationTest.java
@@ -794,7 +794,7 @@ class AmqpMessageDispatcherServiceIntegrationTest extends AbstractAmqpServiceInt
}
private void waitUntil(final Callable callable) {
- createConditionFactory().until(() -> SecurityContextSwitch.runAsPrivileged(callable));
+ await().until(() -> SecurityContextSwitch.runAsPrivileged(callable));
}
private void assertLatestMultiActionMessageContainsInstallMessages(final String controllerId,
diff --git a/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageHandlerServiceIntegrationTest.java b/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageHandlerServiceIntegrationTest.java
index 7b66b4a95..dafae26fc 100644
--- a/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageHandlerServiceIntegrationTest.java
+++ b/hawkbit-dmf/hawkbit-dmf-amqp/src/test/java/org/eclipse/hawkbit/integration/AmqpMessageHandlerServiceIntegrationTest.java
@@ -1229,26 +1229,22 @@ class AmqpMessageHandlerServiceIntegrationTest extends AbstractAmqpServiceIntegr
}
private void assertAction(final Long actionId, final int messages, final Status... expectedActionStates) {
- createConditionFactory().await().untilAsserted(() -> {
+ await().untilAsserted(() -> {
try {
SecurityContextSwitch.runAsPrivileged(() -> {
- final List actionStatusList = deploymentManagement
- .findActionStatusByAction(actionId, PAGE).getContent();
+ final List actionStatusList = deploymentManagement.findActionStatusByAction(actionId, PAGE).getContent();
// Check correlation ID
final List messagesFromServer = actionStatusList.stream()
.flatMap(actionStatus -> deploymentManagement
.findMessagesByActionStatusId(actionStatus.getId(), PAGE).getContent().stream())
.filter(Objects::nonNull)
- .filter(message -> message
- .startsWith(RepositoryConstants.SERVER_MESSAGE_PREFIX + "DMF message"))
+ .filter(message -> message.startsWith(RepositoryConstants.SERVER_MESSAGE_PREFIX + "DMF message"))
.toList();
- assertThat(messagesFromServer).hasSize(messages)
- .allMatch(message -> message.endsWith(CORRELATION_ID));
+ assertThat(messagesFromServer).hasSize(messages).allMatch(message -> message.endsWith(CORRELATION_ID));
- final List status = actionStatusList.stream().map(ActionStatus::getStatus)
- .toList();
+ final List status = actionStatusList.stream().map(ActionStatus::getStatus).toList();
assertThat(status).containsOnly(expectedActionStates);
return null;
@@ -1267,7 +1263,7 @@ class AmqpMessageHandlerServiceIntegrationTest extends AbstractAmqpServiceIntegr
private void assertActionStatusList(final Long actionId, final int statusListCount,
final Status... expectedActionStates) {
- createConditionFactory().await().untilAsserted(() -> {
+ await().untilAsserted(() -> {
try {
SecurityContextSwitch.runAsPrivileged(() -> {
final List actionStatusList = deploymentManagement
@@ -1302,8 +1298,8 @@ class AmqpMessageHandlerServiceIntegrationTest extends AbstractAmqpServiceIntegr
private void verifyNumberOfDeadLetterMessages(final int numberOfInvocations) {
assertEmptyReceiverQueueCount();
- createConditionFactory().untilAsserted(() -> Mockito
- .verify(getDeadletterListener(), Mockito.times(numberOfInvocations)).handleMessage(Mockito.any()));
+ await().untilAsserted(
+ () -> Mockito.verify(getDeadletterListener(), Mockito.times(numberOfInvocations)).handleMessage(Mockito.any()));
Mockito.reset(getDeadletterListener());
}
-}
+}
\ No newline at end of file
diff --git a/hawkbit-dmf/hawkbit-dmf-rabbitmq-test/src/main/java/org/eclipse/hawkbit/rabbitmq/test/AbstractAmqpIntegrationTest.java b/hawkbit-dmf/hawkbit-dmf-rabbitmq-test/src/main/java/org/eclipse/hawkbit/rabbitmq/test/AbstractAmqpIntegrationTest.java
index cfbd2fcc7..bf6ebcc95 100644
--- a/hawkbit-dmf/hawkbit-dmf-rabbitmq-test/src/main/java/org/eclipse/hawkbit/rabbitmq/test/AbstractAmqpIntegrationTest.java
+++ b/hawkbit-dmf/hawkbit-dmf-rabbitmq-test/src/main/java/org/eclipse/hawkbit/rabbitmq/test/AbstractAmqpIntegrationTest.java
@@ -40,8 +40,6 @@ import org.springframework.test.context.ContextConfiguration;
@SuppressWarnings("java:S6813") // constructor injects are not possible for test classes
public abstract class AbstractAmqpIntegrationTest extends AbstractIntegrationTest {
- private static final Duration TIMEOUT = Duration.ofSeconds(5);
-
@Autowired
private ConnectionFactory connectionFactory;
@Autowired
@@ -60,8 +58,11 @@ public abstract class AbstractAmqpIntegrationTest extends AbstractIntegrationTes
return dmfClient;
}
- protected ConditionFactory createConditionFactory() {
- return Awaitility.await().atMost(TIMEOUT.toMillis(), TimeUnit.MILLISECONDS);
+ private static final Duration AT_LEAST = Duration.ofMillis(Integer.getInteger("hawkbit.it.amqp.await.atLeastMs", 100));
+ private static final Duration POLL_INTERVAL = Duration.ofMillis(Integer.getInteger("hawkbit.it.amqp.await.pollIntervalMs", 200));
+ private static final Duration TIMEOUT = Duration.ofMillis(Integer.getInteger("hawkbit.it.amqp.await.timeoutMs", 5000));
+ protected ConditionFactory await() {
+ return Awaitility.await().atLeast(AT_LEAST).pollInterval(POLL_INTERVAL).atMost(TIMEOUT);
}
protected Message createMessage(final Object payload, final MessageProperties messageProperties) {
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResourceTest.java
index 35734b8d7..cb4ceb22f 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtActionResourceTest.java
@@ -19,14 +19,11 @@ 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.status;
-import java.time.Duration;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
-import java.util.concurrent.TimeUnit;
-import org.awaitility.Awaitility;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtActionRestApi;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRepresentationMode;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants;
@@ -42,7 +39,7 @@ import org.springframework.test.web.servlet.ResultActions;
/**
* Integration test for the {@link MgmtActionRestApi}.
- *
+ *
* Feature: Component Tests - Management API
* Story: Action Resource
*/
@@ -65,7 +62,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
* Handles the GET request of retrieving a specific action.
*/
@Test
- void getAction() throws Exception {
+ void getAction() throws Exception {
getAction(false);
}
@@ -73,7 +70,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
* Handles the GET request of retrieving a specific action with external reference.
*/
@Test
- void getActionExtRef() throws Exception {
+ void getActionExtRef() throws Exception {
getAction(true);
}
@@ -82,7 +79,6 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
*/
@Test
void filterActionsByStatus() throws Exception {
-
// prepare test
final DistributionSet dsA = testdataFactory.createDistributionSet("");
assignDistributionSet(dsA, Collections.singletonList(testdataFactory.createTarget("knownTargetId")));
@@ -217,8 +213,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
controllerManagement.addUpdateActionStatus(entityFactory.actionStatus().create(action.getId()).code(200)
.message("Update succeeded").status(Status.FINISHED));
- // verify that one result is returned if the actions are filtered for
- // status code 200
+ // verify that one result is returned if the actions are filtered for status code 200
final String rsqlStatusCode = "lastStatusCode==200";
mvc.perform(get(MgmtRestConstants.ACTION_V1_REQUEST_MAPPING + "?q=" + rsqlStatusCode))
.andDo(MockMvcResultPrinter.print())
@@ -227,8 +222,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
.andExpect(jsonPath("size", equalTo(1)))
.andExpect(jsonPath("content[0].status", equalTo("finished")));
- // verify no result is returned if we filter for a non-existing status
- // code
+ // verify no result is returned if we filter for a non-existing status code
final String rsqlWrongStatusCode = "lastStatusCode==999";
mvc.perform(get(MgmtRestConstants.ACTION_V1_REQUEST_MAPPING + "?q=" + rsqlWrongStatusCode))
.andDo(MockMvcResultPrinter.print())
@@ -298,8 +292,8 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
// rollout
final Target target1 = testdataFactory.createTarget("t1");
- final Rollout rollout = testdataFactory.createRolloutByVariables("TestRollout", "TestDesc", 1,
- "name==" + target1.getName(), ds, "50", "5");
+ final Rollout rollout = testdataFactory.createRolloutByVariables(
+ "TestRollout", "TestDesc", 1, "name==" + target1.getName(), ds, "50", "5");
rolloutManagement.start(rollout.getId());
rolloutHandler.handleAll();
@@ -517,8 +511,8 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
}
private static String generateActionLink(final String targetId, final Long actionId) {
- return "http://localhost" + MgmtRestConstants.TARGET_V1_REQUEST_MAPPING + "/" + targetId + "/" +
- MgmtRestConstants.TARGET_V1_ACTIONS + "/" + actionId;
+ return "http://localhost" + MgmtRestConstants.TARGET_V1_REQUEST_MAPPING +
+ "/" + targetId + "/" + MgmtRestConstants.TARGET_V1_ACTIONS + "/" + actionId;
}
private static String generateTargetLink(final String targetId) {
@@ -526,8 +520,7 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
}
private static String generateDistributionSetLink(final Action action) {
- return "http://localhost" + MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/"
- + action.getDistributionSet().getId();
+ return "http://localhost" + MgmtRestConstants.DISTRIBUTIONSET_V1_REQUEST_MAPPING + "/" + action.getDistributionSet().getId();
}
private void verifyResultsByTargetPropertyFilter(final Target target, final DistributionSet ds, final String rsqlTargetFilter)
@@ -598,13 +591,12 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
final DistributionSet ds = testdataFactory.createDistributionSet();
// rollout
final Target target = testdataFactory.createTarget(knownTargetId);
- final Rollout rollout = testdataFactory.createRolloutByVariables("TestRollout", "TestDesc", 1,
- "name==" + target.getName(), ds, "50", "5");
+ final Rollout rollout = testdataFactory.createRolloutByVariables(
+ "TestRollout", "TestDesc", 1, "name==" + target.getName(), ds, "50", "5");
rolloutManagement.start(rollout.getId());
rolloutHandler.handleAll();
- final List actions = deploymentManagement.findActionsByTarget(target.getControllerId(), PAGE)
- .getContent();
+ final List actions = deploymentManagement.findActionsByTarget(target.getControllerId(), PAGE).getContent();
assertThat(actions).hasSize(1);
final String externalRef = "externalRef#123";
if (withExternalRef) {
@@ -625,8 +617,8 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
return generateTargetWithTwoUpdatesWithOneOverrideWithMaintenanceWindow(knownTargetId, null, null, null);
}
- private List generateTargetWithTwoUpdatesWithOneOverrideWithMaintenanceWindow(final String knownTargetId,
- final String schedule, final String duration, final String timezone) {
+ private List generateTargetWithTwoUpdatesWithOneOverrideWithMaintenanceWindow(
+ final String knownTargetId, final String schedule, final String duration, final String timezone) {
final Target target = testdataFactory.createTarget(knownTargetId);
final Iterator sets = testdataFactory.createDistributionSets(2).iterator();
@@ -639,26 +631,22 @@ class MgmtActionResourceTest extends AbstractManagementApiIntegrationTest {
.getAssignedEntity().stream().map(Action::getTarget).toList();
// 2nd update
// sleep 10ms to ensure that we can sort by reportedAt
- Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
- .pollInterval(10, TimeUnit.MILLISECONDS)
- .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
+ await().until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSet(two, updatedTargets);
} else {
- final List updatedTargets = assignDistributionSetWithMaintenanceWindow(one.getId(),
- target.getControllerId(), schedule, duration, timezone).getAssignedEntity().stream()
- .map(Action::getTarget).toList();
+ final List updatedTargets =
+ assignDistributionSetWithMaintenanceWindow(one.getId(), target.getControllerId(), schedule, duration, timezone)
+ .getAssignedEntity().stream()
+ .map(Action::getTarget)
+ .toList();
// 2nd update
// sleep 10ms to ensure that we can sort by reportedAt
- Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
- .pollInterval(10, TimeUnit.MILLISECONDS)
- .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
- assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule,
- duration, timezone);
+ await().until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
+ assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule, duration, timezone);
}
// two updates, one cancellation
- final List actions = deploymentManagement.findActionsByTarget(target.getControllerId(), PAGE)
- .getContent();
+ final List actions = deploymentManagement.findActionsByTarget(target.getControllerId(), PAGE).getContent();
assertThat(actions).hasSize(2);
return actions;
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetTypeResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetTypeResourceTest.java
index 09defe691..e4690db03 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetTypeResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtDistributionSetTypeResourceTest.java
@@ -46,7 +46,7 @@ import org.springframework.test.web.servlet.MvcResult;
/**
* Test for {@link MgmtDistributionSetTypeResource}.
- *
+ *
* Feature: Component Tests - Management API
* Story: Distribution Set Type Resource
*/
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResourceTest.java
index 2ae7fbab1..623b81f8c 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtRolloutResourceTest.java
@@ -34,8 +34,8 @@ import java.util.Optional;
import java.util.stream.Stream;
import org.awaitility.Awaitility;
+import org.awaitility.core.ConditionFactory;
import org.eclipse.hawkbit.exception.SpServerError;
-import org.eclipse.hawkbit.im.authentication.SpPermission;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRestConstants;
import org.eclipse.hawkbit.mgmt.rest.resource.mapper.MgmtRestModelMapper;
import org.eclipse.hawkbit.repository.RolloutGroupManagement;
@@ -74,7 +74,7 @@ import org.springframework.test.web.servlet.ResultMatcher;
/**
* Tests for covering the {@link MgmtRolloutResource}.
- *
+ *
* Feature: Component Tests - Management API
* Story: Rollout Resource
*/
@@ -95,7 +95,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Handles the GET request of retrieving a single rollout.
*/
@Test
- void getRollout() throws Exception {
+ void getRollout() throws Exception {
enableMultiAssignments();
approvalStrategy.setApprovalNeeded(true);
try {
@@ -132,7 +132,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Handles the GET request of retrieving a all targets of a specific deploy group of a rollout.
*/
@Test
- void getRolloutDeployGroupTargetsWithParameters() throws Exception {
+ void getRolloutDeployGroupTargetsWithParameters() throws Exception {
testdataFactory.createTargets(4, "rollout", "description");
final DistributionSet dsA = testdataFactory.createDistributionSet("");
final Rollout rollout = createRollout("rollout1", 2, dsA.getId(), "controllerId==rollout*");
@@ -152,7 +152,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Handles the POST request of approving a rollout.
*/
@Test
- void approveRollout() throws Exception {
+ void approveRollout() throws Exception {
approvalStrategy.setApprovalNeeded(true);
try {
testdataFactory.createTargets(4, "rollout", "description");
@@ -190,7 +190,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Check if approvalDecidedBy and approvalRemark are present when rollout is approved
*/
@Test
- void validateIfApprovalFieldsArePresentAfterApproval() throws Exception {
+ void validateIfApprovalFieldsArePresentAfterApproval() throws Exception {
approvalStrategy.setApprovalNeeded(true);
approvalStrategy.setApproveDecidedBy("testUser");
final int amountTargets = 2;
@@ -223,7 +223,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Retry rollout test scenario
*/
@Test
- void retryRolloutTest() throws Exception {
+ void retryRolloutTest() throws Exception {
final DistributionSet dsA = testdataFactory.createDistributionSet("");
final List successTargets = testdataFactory.createTargets("retryRolloutTargetSuccess-", 6);
@@ -294,7 +294,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Retrying a running rollout should not be allowed.
*/
@Test
- void retryNotFinishedRolloutShouldNotBeAllowed() throws Exception {
+ void retryNotFinishedRolloutShouldNotBeAllowed() throws Exception {
final DistributionSet dsA = testdataFactory.createDistributionSet("");
testdataFactory.createTargets("retryRolloutTarget-", 10);
postRollout("rolloutToBeRetried", 1, dsA.getId(), "id==retryRolloutTarget*", 10, Action.ActionType.FORCED);
@@ -314,7 +314,7 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
* Retrying a non-existing rollout should lead to NOT FOUND.
*/
@Test
- void retryNonExistingRolloutShouldLeadToNotFound() throws Exception {
+ void retryNonExistingRolloutShouldLeadToNotFound() throws Exception {
mvc.perform(post("/rest/v1/rollouts/{rolloutId}/retry", 6782623))
.andDo(MockMvcResultPrinter.print())
.andExpect(status().isNotFound());
@@ -1911,19 +1911,22 @@ class MgmtRolloutResourceTest extends AbstractManagementApiIntegrationTest {
}
private void awaitRunningState(final Long rolloutId) {
- Awaitility.await().atMost(Duration.ofMinutes(1)).pollInterval(Duration.ofMillis(100)).with()
- .until(() -> SecurityContextSwitch
- .runAsPrivileged(
- () -> rolloutManagement.get(rolloutId).orElseThrow(NoSuchElementException::new))
- .getStatus().equals(RolloutStatus.RUNNING));
+ awaitRollout().until(() -> SecurityContextSwitch
+ .runAsPrivileged(() -> rolloutManagement.get(rolloutId).orElseThrow(NoSuchElementException::new))
+ .getStatus().equals(RolloutStatus.RUNNING));
}
private void awaitActionStatus(final Long actionId, final Status status) {
- Awaitility.await().atMost(Duration.ofMinutes(1)).pollInterval(Duration.ofMillis(100)).with()
- .until(() -> SecurityContextSwitch
- .runAsPrivileged(
- () -> deploymentManagement.findAction(actionId).orElseThrow(NoSuchElementException::new))
- .getStatus().equals(status));
+ awaitRollout().until(() -> SecurityContextSwitch
+ .runAsPrivileged(() -> deploymentManagement.findAction(actionId).orElseThrow(NoSuchElementException::new))
+ .getStatus().equals(status));
+ }
+
+ private static final Duration ROLLOUT_AT_LEAST = Duration.ofMillis(Integer.getInteger("hawkbit.it.rest.await.rolloutAtLeastMs", 50));
+ private static final Duration ROLLOUT_POLL_INTERVAL = Duration.ofMillis(Integer.getInteger("hawkbit.it.rest.await.rolloutPollIntervalMs", 100));
+ private static final Duration ROLLOUT_TIMEOUT = Duration.ofMillis(Integer.getInteger("hawkbit.it.rest.await.rolloutTimeoutMs", 60_000));
+ private ConditionFactory awaitRollout() {
+ return Awaitility.await().atLeast(ROLLOUT_AT_LEAST).pollInterval(ROLLOUT_POLL_INTERVAL).atMost(ROLLOUT_TIMEOUT);
}
private void assertStatusIs(final Rollout rollout, final RolloutStatus expected) {
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java
index d6274e53c..5580490b1 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleResourceTest.java
@@ -32,16 +32,13 @@ import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.
import java.io.ByteArrayInputStream;
import java.io.IOException;
import java.io.InputStream;
-import java.time.Duration;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.Optional;
-import java.util.concurrent.TimeUnit;
import com.jayway.jsonpath.JsonPath;
import org.apache.commons.io.IOUtils;
-import org.awaitility.Awaitility;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.mgmt.json.model.artifact.MgmtArtifact;
import org.eclipse.hawkbit.mgmt.rest.api.MgmtRepresentationMode;
@@ -83,7 +80,7 @@ import org.springframework.web.bind.annotation.RestController;
/**
* Tests for {@link MgmtSoftwareModuleResource} {@link RestController}.
- *
+ *
* Feature: Component Tests - Management API
* Story: Software Module Resource
*/
@@ -249,10 +246,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
.toString();
// ensures that we are not to fast so that last modified is not set correctly
- Awaitility.await()
- .atMost(Duration.ofMillis(100))
- .pollInterval(10L, TimeUnit.MILLISECONDS)
- .until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
+ await().until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
mvc.perform(put("/rest/v1/softwaremodules/{smId}", sm.getId()).content(body)
.contentType(MediaType.APPLICATION_JSON))
@@ -292,10 +286,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
final String body = new JSONObject().put("deleted", true).toString();
// ensures that we are not to fast so that last modified is not set correctly
- Awaitility.await()
- .atMost(Duration.ofMillis(100))
- .pollInterval(10L, TimeUnit.MILLISECONDS)
- .until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
+ await().until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
mvc.perform(put("/rest/v1/softwaremodules/{smId}", sm.getId()).content(body)
.contentType(MediaType.APPLICATION_JSON))
@@ -323,10 +314,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
entityFactory.softwareModule().create().type(osType).name("name1").version("version1"));
assertThat(sm.isLocked()).as("Created software module should not be locked").isFalse();
// ensures that we are not to fast so that last modified is not set correctly
- Awaitility.await()
- .atMost(Duration.ofMillis(100))
- .pollInterval(10L, TimeUnit.MILLISECONDS)
- .until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
+ await().until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
// lock
final String body = new JSONObject().put("locked", true).toString();
@@ -361,10 +349,7 @@ class MgmtSoftwareModuleResourceTest extends AbstractManagementApiIntegrationTes
.as("Software module is locked")
.isTrue();
// ensures that we are not to fast so that last modified is not set correctly
- Awaitility.await()
- .atMost(Duration.ofMillis(100))
- .pollInterval(10L, TimeUnit.MILLISECONDS)
- .until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
+ await().until(() -> sm.getLastModifiedAt() > 0L && sm.getLastModifiedBy() != null);
// unlock
final String body = new JSONObject().put("locked", false).toString();
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleTypeResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleTypeResourceTest.java
index d1c092b41..b50d16fcc 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleTypeResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtSoftwareModuleTypeResourceTest.java
@@ -41,7 +41,7 @@ import org.springframework.test.web.servlet.MvcResult;
/**
* Test for {@link MgmtSoftwareModuleTypeResource}.
- *
+ *
* Feature: Component Tests - Management API
* Story: Software Module Type Resource
*/
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetFilterQueryResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetFilterQueryResourceTest.java
index 6417b4fa4..a51dfd88e 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetFilterQueryResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetFilterQueryResourceTest.java
@@ -55,7 +55,7 @@ import org.springframework.web.util.UriUtils;
/**
* Spring MVC Tests against the MgmtTargetResource.
- *
+ *
* Feature: Component Tests - Management API
* Story: Target Filter Query Resource
*/
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetResourceTest.java
index a20c97cd4..c4a168c51 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetResourceTest.java
@@ -30,7 +30,6 @@ 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.status;
-import java.time.Duration;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
@@ -40,14 +39,12 @@ import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Optional;
-import java.util.concurrent.TimeUnit;
import java.util.stream.Stream;
import jakarta.validation.ConstraintViolationException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.jayway.jsonpath.JsonPath;
-import org.awaitility.Awaitility;
import org.eclipse.hawkbit.exception.SpServerError;
import org.eclipse.hawkbit.im.authentication.SpPermission;
import org.eclipse.hawkbit.mgmt.json.model.action.MgmtActionConfirmationRequestBodyPut;
@@ -102,7 +99,7 @@ import org.springframework.test.web.servlet.ResultActions;
/**
* Spring MVC Tests against the MgmtTargetResource.
- *
+ *
* Feature: Component Tests - Management API
* Story: Target Resource
*/
@@ -2971,9 +2968,7 @@ class MgmtTargetResourceTest extends AbstractManagementApiIntegrationTest {
.getAssignedEntity().stream().map(Action::getTarget).toList();
// 2nd update
// sleep 10ms to ensure that we can sort by reportedAt
- Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
- .pollInterval(10, TimeUnit.MILLISECONDS)
- .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
+ await().until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSet(two, updatedTargets);
} else {
final List updatedTargets = assignDistributionSetWithMaintenanceWindow(one.getId(),
@@ -2981,9 +2976,7 @@ class MgmtTargetResourceTest extends AbstractManagementApiIntegrationTest {
.map(Action::getTarget).toList();
// 2nd update
// sleep 10ms to ensure that we can sort by reportedAt
- Awaitility.await().atMost(Duration.ofMillis(100)).atLeast(5, TimeUnit.MILLISECONDS)
- .pollInterval(10, TimeUnit.MILLISECONDS)
- .until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
+ await().until(() -> updatedTargets.stream().allMatch(t -> t.getLastModifiedAt() > 0L));
assignDistributionSetWithMaintenanceWindow(two.getId(), updatedTargets.get(0).getControllerId(), schedule,
duration, timezone);
}
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTagResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTagResourceTest.java
index 8de0af2ab..c52143449 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTagResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTagResourceTest.java
@@ -50,7 +50,7 @@ import org.springframework.test.web.servlet.ResultActions;
/**
* Spring MVC Tests against the MgmtTargetTagResource.
- *
+ *
* Feature: Component Tests - Management API
* Story: Target Tag Resource
*/
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeResourceTest.java
index b8c6f6770..66021f050 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTargetTypeResourceTest.java
@@ -49,7 +49,7 @@ import org.springframework.test.web.servlet.ResultActions;
/**
* Spring MVC Tests against the MgmtTargetTypeResource.
- *
+ *
* Feature: Component Tests - Management API
* Story: Target Type Resource
*/
diff --git a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTenantManagementResourceTest.java b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTenantManagementResourceTest.java
index 9204066d5..69ede9f0f 100644
--- a/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTenantManagementResourceTest.java
+++ b/hawkbit-mgmt/hawkbit-mgmt-resource/src/test/java/org/eclipse/hawkbit/mgmt/rest/resource/MgmtTenantManagementResourceTest.java
@@ -32,7 +32,7 @@ import org.springframework.test.web.servlet.ResultMatcher;
/**
* Spring MVC Tests against the MgmtTenantManagementResource.
- *
+ *
* Feature: Component Tests - Management API
* Story: Tenant Management Resource
*/
diff --git a/hawkbit-repository/hawkbit-repository-api/src/test/java/org/eclipse/hawkbit/repository/ArtifactEncryptionServiceTest.java b/hawkbit-repository/hawkbit-repository-api/src/test/java/org/eclipse/hawkbit/repository/ArtifactEncryptionServiceTest.java
index 1f85134ef..c7257299b 100644
--- a/hawkbit-repository/hawkbit-repository-api/src/test/java/org/eclipse/hawkbit/repository/ArtifactEncryptionServiceTest.java
+++ b/hawkbit-repository/hawkbit-repository-api/src/test/java/org/eclipse/hawkbit/repository/ArtifactEncryptionServiceTest.java
@@ -18,7 +18,7 @@ import org.junit.jupiter.api.Test;
/**
* Test class to verify that no {@link ArtifactEncryptionService} required beans
* are loaded and therefore the encryption support is not given.
- *
+ *
* Feature: Unit Tests - Repository
* Story: Artifact Encryption Service
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa-eclipselink/src/test/java/org/eclipse/hawkbit/repository/jpa/HawkBitEclipseLinkJpaDialectTest.java b/hawkbit-repository/hawkbit-repository-jpa-eclipselink/src/test/java/org/eclipse/hawkbit/repository/jpa/HawkBitEclipseLinkJpaDialectTest.java
index 3e07332de..4a99d4092 100644
--- a/hawkbit-repository/hawkbit-repository-jpa-eclipselink/src/test/java/org/eclipse/hawkbit/repository/jpa/HawkBitEclipseLinkJpaDialectTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa-eclipselink/src/test/java/org/eclipse/hawkbit/repository/jpa/HawkBitEclipseLinkJpaDialectTest.java
@@ -24,7 +24,7 @@ import org.springframework.dao.UncategorizedDataAccessException;
/**
* Mapping tests for {@link HawkbitEclipseLinkJpaDialect}.
- *
+ *
* Feature: Unit Tests - Repository
* Story: Exception handling
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/repository/ActionRepository.java b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/repository/ActionRepository.java
index c0dc2a4ce..8b4a58788 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/repository/ActionRepository.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/main/java/org/eclipse/hawkbit/repository/jpa/repository/ActionRepository.java
@@ -161,7 +161,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Counts all actions referring to a given rollout, rollout group and status.
- *
+ *
* No access control applied
*
* @param rolloutId the ID of rollout the actions belong to
@@ -196,7 +196,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Returns {@code true} if actions for the given rollout exists, otherwise {@code false}
- *
+ *
* No access control applied
*
* @param rolloutId the ID of the rollout the actions belong to
@@ -208,9 +208,9 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Retrieving all actions referring to a given rollout with a specific action as parent reference and a specific status.
- *
+ *
* Finding all actions of a specific rollout group parent relation.
- *
+ *
* No access control applied
*
* @param pageable page parameters
@@ -224,7 +224,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Retrieving all actions referring to the first group of a rollout.
- *
+ *
* No access control applied
*
* @param pageable page parameters
@@ -237,7 +237,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Retrieves all actions for a specific rollout and in a specific status.
- *
+ *
* No access control applied
*
* @param pageable page parameters
@@ -249,7 +249,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Get list of objects which has details of status and count of targets in each status in specified rollout.
- *
+ *
* No access control applied
*
* @param rolloutId id of {@link Rollout}
@@ -260,7 +260,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Get list of objects which has details of status and count of targets in each status in specified rollout.
- *
+ *
* No access control applied
*
* @param rolloutId id of {@link Rollout}
@@ -271,7 +271,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Get list of objects which has details of status and count of targets in each status in specified rollout group.
- *
+ *
* No access control applied
*
* @param rolloutGroupId id of {@link RolloutGroup}
@@ -282,7 +282,7 @@ public interface ActionRepository extends BaseEntityRepository {
/**
* Get list of objects which has details of status and count of targets in each status in specified rollout group.
- *
+ *
* No access control applied
*
* @param rolloutGroupId list of id of {@link RolloutGroup}
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/RemoteIdEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/RemoteIdEventTest.java
index 585a43dcd..f6a6446ca 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/RemoteIdEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/RemoteIdEventTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Entity Id Events
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/AbstractRemoteEntityEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/AbstractRemoteEntityEventTest.java
index 1284b5b37..d85749c87 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/AbstractRemoteEntityEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/AbstractRemoteEntityEventTest.java
@@ -19,7 +19,7 @@ import org.eclipse.hawkbit.repository.event.remote.AbstractRemoteEventTest;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Entity Events
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionEventTest.java
index a83892816..4ba233581 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/ActionEventTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test ActionCreatedEvent and ActionUpdatedEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEventTest.java
index 60d03a913..2ebbd38d3 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetCreatedEventTest.java
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test DistributionSetCreatedEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagEventTest.java
index ca33aec2e..a26209312 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetTagEventTest.java
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test DistributionSetTagCreatedEvent and DistributionSetTagUpdateEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEventTest.java
index 67047a211..630657f0c 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/DistributionSetUpdatedEventTest.java
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test DistributionSetUpdateEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutEventTest.java
index 9ffca7e2e..3da9d16c7 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutEventTest.java
@@ -20,7 +20,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test RolloutUpdatedEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupEventTest.java
index 598fba6e4..79fe77be5 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/RolloutGroupEventTest.java
@@ -24,7 +24,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test RolloutGroupCreatedEvent and RolloutGroupUpdatedEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleEventTest.java
index 9a524eaba..f418c1d89 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/SoftwareModuleEventTest.java
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test SoftwareModuleCreatedEvent, SoftwareModuleUpdatedEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetEventTest.java
index 5a1bd5dd6..6cdbc2343 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetEventTest.java
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test TargetCreatedEvent, TargetUpdatedEvent and CancelTargetAssignmentEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagEventTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagEventTest.java
index b064eda64..6a9f517bd 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagEventTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/event/remote/entity/TargetTagEventTest.java
@@ -14,7 +14,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the remote entity events.
- *
+ *
* Feature: Component Tests - Repository
* Story: Test TargetTagCreatedEvent and TargetTagUpdateEvent
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/ConcurrentDistributionSetInvalidationTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/ConcurrentDistributionSetInvalidationTest.java
index 22ee0e46a..8d5125724 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/ConcurrentDistributionSetInvalidationTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/ConcurrentDistributionSetInvalidationTest.java
@@ -43,7 +43,7 @@ import org.springframework.test.context.TestPropertySource;
/**
* Test class testing the invalidation of a {@link DistributionSet} while the
* handle rollouts is ongoing.
- *
+ *
* Feature: Component Tests - Repository
* Story: Concurrent Distribution Set invalidation
*/
@@ -67,12 +67,14 @@ class ConcurrentDistributionSetInvalidationTest extends AbstractJpaIntegrationTe
return 0;
}, tenant)).start();
- // wait until at least one RolloutGroup is created, as this means that
- // the thread has started and has acquired the lock
- Awaitility.await().atMost(Duration.ofSeconds(5))
+ // wait until at least one RolloutGroup is created, as this means that the thread has started and has acquired the lock
+ Awaitility.await()
.pollInterval(Duration.ofMillis(100))
- .until(() -> tenantAware.runAsTenant(tenant, () -> systemSecurityContext
- .runAsSystem(() -> rolloutGroupManagement.findByRollout(rollout.getId(), PAGE).getSize() > 0)));
+ .atMost(Duration.ofSeconds(5))
+ .until(() -> tenantAware.runAsTenant(
+ tenant,
+ () -> systemSecurityContext.runAsSystem(
+ () -> rolloutGroupManagement.findByRollout(rollout.getId(), PAGE).getSize() > 0)));
final DistributionSetInvalidation distributionSetInvalidation = new DistributionSetInvalidation(
Collections.singletonList(distributionSet.getId()), CancelationType.SOFT, true);
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignCheckerIntTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignCheckerIntTest.java
index 938aed340..642bcb994 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignCheckerIntTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autoassign/AutoAssignCheckerIntTest.java
@@ -45,7 +45,7 @@ import org.springframework.data.domain.Slice;
/**
* Test class for {@link AutoAssignChecker}.
- *
+ *
* Feature: Component Tests - Repository
* Story: Auto assign checker
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoActionCleanupTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoActionCleanupTest.java
index 376ca007d..a001d73e1 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoActionCleanupTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoActionCleanupTest.java
@@ -27,7 +27,7 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
* Test class for {@link AutoActionCleanup}.
- *
+ *
* Feature: Component Tests - Repository
* Story: Action cleanup handler
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupSchedulerTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupSchedulerTest.java
index 81fbdac5e..086d8caac 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupSchedulerTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/autocleanup/AutoCleanupSchedulerTest.java
@@ -22,7 +22,7 @@ import org.springframework.integration.support.locks.LockRegistry;
/**
* Test class for {@link AutoCleanupScheduler}.
- *
+ *
* Feature: Component Tests - Repository
* Story: Auto cleanup scheduler
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ActionTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ActionTest.java
index 11c20001d..aa433063c 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ActionTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ActionTest.java
@@ -48,7 +48,10 @@ class ActionTest extends AbstractJpaIntegrationTest {
assertThat(timeforcedAction.isForcedOrTimeForced()).isFalse();
// wait until timeforce time is hit
- Awaitility.await().atMost(Duration.ofSeconds(2)).pollInterval(Duration.ofMillis(100)).until(timeforcedAction::isForcedOrTimeForced);
+ Awaitility.await()
+ .pollInterval(Duration.ofMillis(100))
+ .atMost(Duration.ofSeconds(2))
+ .until(timeforcedAction::isForcedOrTimeForced);
}
/**
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ArtifactManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ArtifactManagementTest.java
index 41693518c..36e666c5a 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ArtifactManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ArtifactManagementTest.java
@@ -54,7 +54,7 @@ import org.junit.jupiter.api.Test;
/**
* Test class for {@link ArtifactManagement}.
- *
+ *
* Feature: Component Tests - Repository
* Story: Artifact Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ConfirmationManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ConfirmationManagementTest.java
index 184274e19..fa131ccc2 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ConfirmationManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/ConfirmationManagementTest.java
@@ -35,7 +35,7 @@ import org.junit.jupiter.params.provider.MethodSource;
/**
* Test class testing the functionality of triggering a deployment of
* {@link DistributionSet}s to {@link Target}s with AutoConfirmation active.
- *
+ *
* Feature: Component Tests - Repository
* Story: Confirmation Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DeploymentManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DeploymentManagementTest.java
index a54fca843..722352c53 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DeploymentManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DeploymentManagementTest.java
@@ -93,7 +93,7 @@ import org.springframework.data.domain.Sort.Direction;
/**
* Test class testing the functionality of triggering a deployment of {@link DistributionSet}s to {@link Target}s.
- *
+ *
* Feature: Component Tests - Repository
* Story: Deployment Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetInvalidationManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetInvalidationManagementTest.java
index ffff68995..5763ce13c 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetInvalidationManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetInvalidationManagementTest.java
@@ -38,7 +38,7 @@ import org.springframework.data.repository.query.Param;
/**
* Test class testing the functionality of invalidating a
* {@link DistributionSet}
- *
+ *
* Feature: Component Tests - Repository
* Story: Distribution set invalidation management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetManagementTest.java
index 469f8d566..f67a732e8 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetManagementTest.java
@@ -69,7 +69,7 @@ import org.springframework.beans.factory.annotation.Autowired;
/**
* {@link DistributionSetManagement} tests.
- *
+ *
* Feature: Component Tests - Repository
* Story: DistributionSet Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTagManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTagManagementTest.java
index 90519135d..c3705e0f2 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTagManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTagManagementTest.java
@@ -41,7 +41,7 @@ import org.springframework.data.domain.Pageable;
/**
* {@link DistributionSetTagManagement} tests.
- *
+ *
* Feature: Component Tests - Repository
* Story: DistributionSet Tag Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTypeManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTypeManagementTest.java
index 465941f65..392be06e3 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTypeManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/DistributionSetTypeManagementTest.java
@@ -44,7 +44,7 @@ import org.junit.jupiter.api.Test;
/**
* {@link DistributionSetManagement} tests.
- *
+ *
* Feature: Component Tests - Repository
* Story: DistributionSet Management
*/
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 4e7fd0296..8e7b0d3bf 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
@@ -32,7 +32,7 @@ import org.springframework.test.context.TestPropertySource;
/**
* Junit tests for RolloutManagement.
- *
+ *
* Feature: Component Tests - Repository
* Story: Rollout Management (Flow)
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementTest.java
index a4764e391..4ef75a779 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/RolloutManagementTest.java
@@ -99,7 +99,7 @@ import org.springframework.data.domain.Sort.Direction;
/**
* Junit tests for RolloutManagement.
- *
+ *
* Feature: Component Tests - Repository
* Story: Rollout Management
*/
@@ -2497,7 +2497,9 @@ class RolloutManagementTest extends AbstractJpaIntegrationTest {
}
private void awaitRunningState(final Long myRolloutId) {
- Awaitility.await().atMost(Duration.ofSeconds(10)).pollInterval(Duration.ofMillis(500)).with()
+ Awaitility.await()
+ .pollInterval(Duration.ofMillis(500))
+ .atMost(Duration.ofSeconds(10))
.until(() -> SecurityContextSwitch
.runAsPrivileged(
() -> rolloutManagement.get(myRolloutId).orElseThrow(NoSuchElementException::new))
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetFilterQueryManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetFilterQueryManagementTest.java
index 990fdced6..e6a4b638a 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetFilterQueryManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetFilterQueryManagementTest.java
@@ -56,7 +56,7 @@ import org.springframework.data.domain.Slice;
/**
* Test class for {@link TargetFilterQueryManagement}.
- *
+ *
* Feature: Component Tests - Repository
* Story: Target Filter Query Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetTagManagementTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetTagManagementTest.java
index b012bf693..f38532516 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetTagManagementTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/management/TargetTagManagementTest.java
@@ -43,7 +43,7 @@ import org.springframework.data.domain.Pageable;
/**
* Test class for {@link TargetTagManagement}.
- *
+ *
* Feature: Component Tests - Repository
* Story: Target Tag Management
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/model/EntityInterceptorListenerTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/model/EntityInterceptorListenerTest.java
index b7ae116f2..7ce8a4040 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/model/EntityInterceptorListenerTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/model/EntityInterceptorListenerTest.java
@@ -21,7 +21,7 @@ import org.junit.jupiter.api.Test;
/**
* Test the entity listener interceptor.
- *
+ *
* Feature: Component Tests - Repository
* Story: Entity Listener Interceptor
*/
diff --git a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/tenancy/MultiTenancyEntityTest.java b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/tenancy/MultiTenancyEntityTest.java
index d70d66055..3a1874355 100644
--- a/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/tenancy/MultiTenancyEntityTest.java
+++ b/hawkbit-repository/hawkbit-repository-jpa/src/test/java/org/eclipse/hawkbit/repository/jpa/tenancy/MultiTenancyEntityTest.java
@@ -31,7 +31,7 @@ import org.springframework.data.domain.Slice;
* Multi-Tenancy tests which testing the CRUD operations of entities that all
* CRUD-Operations are tenant aware and cannot access or delete entities not
* belonging to the current tenant.
- *
+ *
* Feature: Component Tests - Repository
* Story: Multi Tenancy
*/
diff --git a/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/AbstractIntegrationTest.java b/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/AbstractIntegrationTest.java
index 0131c72d2..cbcbe4653 100644
--- a/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/AbstractIntegrationTest.java
+++ b/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/AbstractIntegrationTest.java
@@ -17,6 +17,7 @@ import java.io.File;
import java.io.IOException;
import java.net.URI;
import java.nio.file.Files;
+import java.time.Duration;
import java.time.ZonedDateTime;
import java.util.Collections;
import java.util.Comparator;
@@ -25,9 +26,10 @@ import java.util.NoSuchElementException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.io.FileUtils;
+import org.awaitility.Awaitility;
+import org.awaitility.core.ConditionFactory;
import org.eclipse.hawkbit.artifact.repository.ArtifactRepository;
import org.eclipse.hawkbit.artifact.repository.ArtifactStoreException;
-import org.eclipse.hawkbit.cache.TenantAwareCacheManager;
import org.eclipse.hawkbit.repository.ArtifactManagement;
import org.eclipse.hawkbit.repository.ConfirmationManagement;
import org.eclipse.hawkbit.repository.ControllerManagement;
@@ -74,7 +76,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.bus.ServiceMatcher;
import org.springframework.context.ApplicationEventPublisher;
-import org.springframework.data.auditing.AuditingHandler;
import org.springframework.data.domain.PageRequest;
import org.springframework.data.domain.Pageable;
import org.springframework.data.domain.Sort;
@@ -263,6 +264,14 @@ public abstract class AbstractIntegrationTest {
return currentTime.getOffset().getId().replace("Z", "+00:00");
}
+ private static final Duration AT_LEAST = Duration.ofMillis(Integer.getInteger("hawkbit.it.rest.await.atLeastMs", 5));
+ private static final Duration POLL_INTERVAL = Duration.ofMillis(Integer.getInteger("hawkbit.it.rest.await.pollIntervalMs", 10));
+ private static final Duration TIMEOUT = Duration.ofMillis(Integer.getInteger("hawkbit.it.rest.await.timeoutMs", 200));
+ // default wait condition factory
+ protected ConditionFactory await() {
+ return Awaitility.await().atLeast(AT_LEAST).pollInterval(POLL_INTERVAL).atMost(TIMEOUT);
+ }
+
protected static Action getFirstAssignedAction(
final DistributionSetAssignmentResult distributionSetAssignmentResult) {
return distributionSetAssignmentResult.getAssignedEntity().stream().findFirst()
diff --git a/hawkbit-rest-core/src/test/java/org/eclipse/hawkbit/rest/AbstractRestIntegrationTest.java b/hawkbit-rest-core/src/test/java/org/eclipse/hawkbit/rest/AbstractRestIntegrationTest.java
index 7bb923216..29d0da3fe 100644
--- a/hawkbit-rest-core/src/test/java/org/eclipse/hawkbit/rest/AbstractRestIntegrationTest.java
+++ b/hawkbit-rest-core/src/test/java/org/eclipse/hawkbit/rest/AbstractRestIntegrationTest.java
@@ -9,6 +9,8 @@
*/
package org.eclipse.hawkbit.rest;
+import java.time.Duration;
+
import org.eclipse.hawkbit.repository.jpa.RepositoryApplicationConfiguration;
import org.eclipse.hawkbit.repository.test.TestConfiguration;
import org.eclipse.hawkbit.repository.test.util.AbstractIntegrationTest;
diff --git a/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityContextSerializer.java b/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityContextSerializer.java
index 222ba5b33..4a1c1f6e5 100644
--- a/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityContextSerializer.java
+++ b/hawkbit-security-core/src/main/java/org/eclipse/hawkbit/security/SecurityContextSerializer.java
@@ -30,7 +30,7 @@ public interface SecurityContextSerializer {
SecurityContextSerializer NOP = new Nop();
/**
* Serializer the uses Java serialization of {@link java.io.Serializable} objects.
- *
+ *
* Note that serialized via java serialization context might become unreadable if incompatible
* changes are made to the object classes.
*/
diff --git a/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/im/authentication/SpPermissionTest.java b/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/im/authentication/SpPermissionTest.java
index 6c3bf0c71..c8a1a357e 100644
--- a/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/im/authentication/SpPermissionTest.java
+++ b/hawkbit-security-core/src/test/java/org/eclipse/hawkbit/im/authentication/SpPermissionTest.java
@@ -20,7 +20,7 @@ import org.springframework.util.ReflectionUtils;
/**
* Test {@link SpPermission}.
- *
+ *
* Feature: Unit Tests - Security
* Story: Permission Test
*/
diff --git a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/SoftwareModuleView.java b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/SoftwareModuleView.java
index f298d93f4..60fb902d8 100644
--- a/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/SoftwareModuleView.java
+++ b/hawkbit-simple-ui/src/main/java/org/eclipse/hawkbit/ui/simple/view/SoftwareModuleView.java
@@ -44,7 +44,6 @@ import com.vaadin.flow.data.renderer.ComponentRenderer;
import com.vaadin.flow.router.PageTitle;
import com.vaadin.flow.router.Route;
import com.vaadin.flow.server.streams.UploadEvent;
-import com.vaadin.flow.server.streams.UploadHandler;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.hawkbit.mgmt.json.model.PagedList;
import org.eclipse.hawkbit.mgmt.json.model.artifact.MgmtArtifact;