diff --git a/hawkbit-repository/hawkbit-repository-test/pom.xml b/hawkbit-repository/hawkbit-repository-test/pom.xml
index 809d67f81e..c41ea9e126 100644
--- a/hawkbit-repository/hawkbit-repository-test/pom.xml
+++ b/hawkbit-repository/hawkbit-repository-test/pom.xml
@@ -90,10 +90,6 @@
org.springframework
spring-tx
-
- net._01001111
- jlorem
-
org.apache.commons
commons-lang3
diff --git a/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/TestdataFactory.java b/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/TestdataFactory.java
index 173423f086..5aef0fea44 100644
--- a/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/TestdataFactory.java
+++ b/hawkbit-repository/hawkbit-repository-test/src/main/java/org/eclipse/hawkbit/repository/test/util/TestdataFactory.java
@@ -78,13 +78,10 @@
import com.google.common.collect.Lists;
-import net._01001111.text.LoremIpsum;
-
/**
* Data generator utility for tests.
*/
public class TestdataFactory {
- private static final LoremIpsum LOREM = new LoremIpsum();
public static final String VISIBLE_SM_MD_KEY = "visibleMetdataKey";
public static final String VISIBLE_SM_MD_VALUE = "visibleMetdataValue";
@@ -109,7 +106,7 @@ public class TestdataFactory {
/**
* Default {@link NamedEntity#getDescription()}.
*/
- public static final String DEFAULT_DESCRIPTION = "Desc: " + LOREM.words(10);
+ public static final String DEFAULT_DESCRIPTION = "Desc: " + randomDescriptionShort();
/**
* Key of test default {@link DistributionSetType}.
@@ -129,8 +126,8 @@ public class TestdataFactory {
public static final String SM_TYPE_RT = "runtime";
/**
- * Key of test "application" {@link SoftwareModuleType} : optional software in
- * {@link #DS_TYPE_DEFAULT}.
+ * Key of test "application" {@link SoftwareModuleType} : optional software
+ * in {@link #DS_TYPE_DEFAULT}.
*/
public static final String SM_TYPE_APP = "application";
@@ -186,8 +183,8 @@ public class TestdataFactory {
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} false
.
*
* @param prefix
@@ -202,8 +199,8 @@ public DistributionSet createDistributionSet(final String prefix) {
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} false
.
*
* @return {@link DistributionSet} entity.
@@ -214,8 +211,8 @@ public DistributionSet createDistributionSet() {
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} false
.
*
* @param modules
@@ -229,8 +226,8 @@ public DistributionSet createDistributionSet(final Collection mo
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} false
.
*
* @param modules
@@ -247,8 +244,8 @@ public DistributionSet createDistributionSet(final Collection mo
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION}.
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION}.
*
* @param prefix
* for {@link SoftwareModule}s and {@link DistributionSet}s name,
@@ -264,8 +261,8 @@ public DistributionSet createDistributionSet(final String prefix, final boolean
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} and
* {@link DistributionSet#isRequiredMigrationStep()} false
.
*
* @param prefix
@@ -282,15 +279,16 @@ public DistributionSet createDistributionSet(final String prefix, final Collecti
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP}.
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP}.
*
* @param prefix
* for {@link SoftwareModule}s and {@link DistributionSet}s name,
* vendor and description.
* @param version
* {@link DistributionSet#getVersion()} and
- * {@link SoftwareModule#getVersion()} extended by a random number.
+ * {@link SoftwareModule#getVersion()} extended by a random
+ * number.
* @param isRequiredMigrationStep
* for {@link DistributionSet#isRequiredMigrationStep()}
*
@@ -301,20 +299,20 @@ public DistributionSet createDistributionSet(final String prefix, final String v
final SoftwareModule appMod = softwareModuleManagement.create(entityFactory.softwareModule().create()
.type(findOrCreateSoftwareModuleType(SM_TYPE_APP, Integer.MAX_VALUE)).name(prefix + SM_TYPE_APP)
- .version(version + "." + new SecureRandom().nextInt(100)).description(LOREM.words(20))
+ .version(version + "." + new SecureRandom().nextInt(100)).description(randomDescriptionLong())
.vendor(prefix + " vendor Limited, California"));
final SoftwareModule runtimeMod = softwareModuleManagement
.create(entityFactory.softwareModule().create().type(findOrCreateSoftwareModuleType(SM_TYPE_RT))
.name(prefix + "app runtime").version(version + "." + new SecureRandom().nextInt(100))
- .description(LOREM.words(20)).vendor(prefix + " vendor GmbH, Stuttgart, Germany"));
+ .description(randomDescriptionLong()).vendor(prefix + " vendor GmbH, Stuttgart, Germany"));
final SoftwareModule osMod = softwareModuleManagement
.create(entityFactory.softwareModule().create().type(findOrCreateSoftwareModuleType(SM_TYPE_OS))
.name(prefix + " Firmware").version(version + "." + new SecureRandom().nextInt(100))
- .description(LOREM.words(20)).vendor(prefix + " vendor Limited Inc, California"));
+ .description(randomDescriptionLong()).vendor(prefix + " vendor Limited Inc, California"));
return distributionSetManagement.create(
entityFactory.distributionSet().create().name(prefix != null && prefix.length() > 0 ? prefix : "DS")
- .version(version).description(LOREM.words(10)).type(findOrCreateDefaultTestDsType())
+ .version(version).description(randomDescriptionShort()).type(findOrCreateDefaultTestDsType())
.modules(Arrays.asList(osMod.getId(), runtimeMod.getId(), appMod.getId()))
.requiredMigrationStep(isRequiredMigrationStep));
}
@@ -351,7 +349,8 @@ private void addTestModuleMetadata(final SoftwareModule module) {
* vendor and description.
* @param version
* {@link DistributionSet#getVersion()} and
- * {@link SoftwareModule#getVersion()} extended by a random number.
+ * {@link SoftwareModule#getVersion()} extended by a random
+ * number.
* @param isRequiredMigrationStep
* for {@link DistributionSet#isRequiredMigrationStep()}
* @param modules
@@ -364,15 +363,15 @@ public DistributionSet createDistributionSet(final String prefix, final String v
return distributionSetManagement.create(
entityFactory.distributionSet().create().name(prefix != null && prefix.length() > 0 ? prefix : "DS")
- .version(version).description(LOREM.words(10)).type(findOrCreateDefaultTestDsType())
+ .version(version).description(randomDescriptionShort()).type(findOrCreateDefaultTestDsType())
.modules(modules.stream().map(SoftwareModule::getId).collect(Collectors.toList()))
.requiredMigrationStep(isRequiredMigrationStep));
}
/**
* Creates {@link DistributionSet} in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP}.
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP}.
*
* @param prefix
* for {@link SoftwareModule}s and {@link DistributionSet}s name,
@@ -399,9 +398,9 @@ public DistributionSet createDistributionSet(final String prefix, final String v
/**
* Creates {@link DistributionSet}s in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative
- * number and {@link DistributionSet#isRequiredMigrationStep()}
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an
+ * iterative number and {@link DistributionSet#isRequiredMigrationStep()}
* false
.
*
* @param number
@@ -415,7 +414,8 @@ public List createDistributionSets(final int number) {
}
/**
- * Create a list of {@link DistributionSet}s without modules, i.e. incomplete.
+ * Create a list of {@link DistributionSet}s without modules, i.e.
+ * incomplete.
*
* @param number
* of {@link DistributionSet}s to create
@@ -427,7 +427,7 @@ public List createDistributionSetsWithoutModules(final int numb
for (int i = 0; i < number; i++) {
sets.add(distributionSetManagement
.create(entityFactory.distributionSet().create().name("DS" + i).version(DEFAULT_VERSION + "." + i)
- .description(LOREM.words(10)).type(findOrCreateDefaultTestDsType())));
+ .description(randomDescriptionShort()).type(findOrCreateDefaultTestDsType())));
}
return sets;
@@ -435,9 +435,9 @@ public List createDistributionSetsWithoutModules(final int numb
/**
* Creates {@link DistributionSet}s in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative
- * number and {@link DistributionSet#isRequiredMigrationStep()}
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an
+ * iterative number and {@link DistributionSet#isRequiredMigrationStep()}
* false
.
*
* @param prefix
@@ -477,8 +477,8 @@ public DistributionSet createDistributionSetWithNoSoftwareModules(final String n
}
/**
- * Creates {@link Artifact}s for given {@link SoftwareModule} with a small text
- * payload.
+ * Creates {@link Artifact}s for given {@link SoftwareModule} with a small
+ * text payload.
*
* @param moduleId
* the {@link Artifact}s belong to.
@@ -496,8 +496,8 @@ public List createArtifacts(final Long moduleId) {
}
/**
- * Create an {@link Artifact} for given {@link SoftwareModule} with a small text
- * payload.
+ * Create an {@link Artifact} for given {@link SoftwareModule} with a small
+ * text payload.
*
* @param artifactData
* the {@link Artifact} Inputstream
@@ -517,8 +517,8 @@ public Artifact createArtifact(final String artifactData, final Long moduleId, f
}
/**
- * Create an {@link Artifact} for given {@link SoftwareModule} with a small text
- * payload.
+ * Create an {@link Artifact} for given {@link SoftwareModule} with a small
+ * text payload.
*
* @param artifactData
* the {@link Artifact} Inputstream
@@ -542,8 +542,8 @@ public Artifact createArtifact(final byte[] artifactData, final Long moduleId, f
/**
* Creates {@link SoftwareModule} with {@link #DEFAULT_VENDOR} and
- * {@link #DEFAULT_VERSION} and random generated {@link Target#getDescription()}
- * in the repository.
+ * {@link #DEFAULT_VERSION} and random generated
+ * {@link Target#getDescription()} in the repository.
*
* @param typeKey
* of the {@link SoftwareModuleType}
@@ -555,9 +555,10 @@ public SoftwareModule createSoftwareModule(final String typeKey) {
}
/**
- * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_APP_KEY}
- * with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random
- * generated {@link Target#getDescription()} in the repository.
+ * Creates {@link SoftwareModule} of type
+ * {@value Constants#SMT_DEFAULT_APP_KEY} with {@link #DEFAULT_VENDOR} and
+ * {@link #DEFAULT_VERSION} and random generated
+ * {@link Target#getDescription()} in the repository.
*
*
* @return persisted {@link SoftwareModule}.
@@ -567,9 +568,10 @@ public SoftwareModule createSoftwareModuleApp() {
}
/**
- * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_APP_KEY}
- * with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random
- * generated {@link Target#getDescription()} in the repository.
+ * Creates {@link SoftwareModule} of type
+ * {@value Constants#SMT_DEFAULT_APP_KEY} with {@link #DEFAULT_VENDOR} and
+ * {@link #DEFAULT_VERSION} and random generated
+ * {@link Target#getDescription()} in the repository.
*
* @param prefix
* added to name and version
@@ -582,9 +584,10 @@ public SoftwareModule createSoftwareModuleApp(final String prefix) {
}
/**
- * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_OS_KEY}
- * with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random
- * generated {@link Target#getDescription()} in the repository.
+ * Creates {@link SoftwareModule} of type
+ * {@value Constants#SMT_DEFAULT_OS_KEY} with {@link #DEFAULT_VENDOR} and
+ * {@link #DEFAULT_VERSION} and random generated
+ * {@link Target#getDescription()} in the repository.
*
*
* @return persisted {@link SoftwareModule}.
@@ -594,9 +597,10 @@ public SoftwareModule createSoftwareModuleOs() {
}
/**
- * Creates {@link SoftwareModule} of type {@value Constants#SMT_DEFAULT_OS_KEY}
- * with {@link #DEFAULT_VENDOR} and {@link #DEFAULT_VERSION} and random
- * generated {@link Target#getDescription()} in the repository.
+ * Creates {@link SoftwareModule} of type
+ * {@value Constants#SMT_DEFAULT_OS_KEY} with {@link #DEFAULT_VENDOR} and
+ * {@link #DEFAULT_VERSION} and random generated
+ * {@link Target#getDescription()} in the repository.
*
* @param prefix
* added to name and version
@@ -610,8 +614,8 @@ public SoftwareModule createSoftwareModuleOs(final String prefix) {
/**
* Creates {@link SoftwareModule} with {@link #DEFAULT_VENDOR} and
- * {@link #DEFAULT_VERSION} and random generated {@link Target#getDescription()}
- * in the repository.
+ * {@link #DEFAULT_VERSION} and random generated
+ * {@link Target#getDescription()} in the repository.
*
* @param typeKey
* of the {@link SoftwareModuleType}
@@ -623,7 +627,7 @@ public SoftwareModule createSoftwareModuleOs(final String prefix) {
public SoftwareModule createSoftwareModule(final String typeKey, final String prefix, final boolean encrypted) {
return softwareModuleManagement.create(entityFactory.softwareModule().create()
.type(findOrCreateSoftwareModuleType(typeKey)).name(prefix + typeKey).version(prefix + DEFAULT_VERSION)
- .description(LOREM.words(10)).vendor(DEFAULT_VENDOR).encrypted(encrypted));
+ .description(randomDescriptionShort()).vendor(DEFAULT_VENDOR).encrypted(encrypted));
}
/**
@@ -651,7 +655,7 @@ public Target createTarget(final String controllerId) {
*/
public Target createTarget(final String controllerId, final String targetName) {
final Target target = targetManagement
- .create(entityFactory.target().create().controllerId(controllerId).name(targetName));
+ .create(entityFactory.target().create().controllerId(controllerId).name(targetName));
assertTargetProperlyCreated(target);
return target;
}
@@ -690,14 +694,15 @@ private void assertTargetProperlyCreated(final Target target) {
/**
* Creates {@link DistributionSet}s in repository including three
- * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT} ,
- * {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an iterative
- * number and {@link DistributionSet#isRequiredMigrationStep()}
+ * {@link SoftwareModule}s of types {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
+ * , {@link #SM_TYPE_APP} with {@link #DEFAULT_VERSION} followed by an
+ * iterative number and {@link DistributionSet#isRequiredMigrationStep()}
* false
.
*
* In addition it updates the created {@link DistributionSet}s and
- * {@link SoftwareModule}s to ensure that {@link BaseEntity#getLastModifiedAt()}
- * and {@link BaseEntity#getLastModifiedBy()} is filled.
+ * {@link SoftwareModule}s to ensure that
+ * {@link BaseEntity#getLastModifiedAt()} and
+ * {@link BaseEntity#getLastModifiedBy()} is filled.
*
* @return persisted {@link DistributionSet}.
*/
@@ -715,8 +720,8 @@ public DistributionSet createUpdatedDistributionSet() {
/**
* @return {@link DistributionSetType} with key {@link #DS_TYPE_DEFAULT} and
- * {@link SoftwareModuleType}s {@link #SM_TYPE_OS}, {@link #SM_TYPE_RT}
- * , {@link #SM_TYPE_APP}.
+ * {@link SoftwareModuleType}s {@link #SM_TYPE_OS},
+ * {@link #SM_TYPE_RT} , {@link #SM_TYPE_APP}.
*/
public DistributionSetType findOrCreateDefaultTestDsType() {
final List mand = new ArrayList<>();
@@ -743,7 +748,7 @@ public DistributionSetType findOrCreateDefaultTestDsType() {
public DistributionSetType findOrCreateDistributionSetType(final String dsTypeKey, final String dsTypeName) {
return distributionSetTypeManagement.getByKey(dsTypeKey)
.orElseGet(() -> distributionSetTypeManagement.create(entityFactory.distributionSetType().create()
- .key(dsTypeKey).name(dsTypeName).description(LOREM.words(10)).colour("black")));
+ .key(dsTypeKey).name(dsTypeName).description(randomDescriptionShort()).colour("black")));
}
/**
@@ -765,15 +770,15 @@ public DistributionSetType findOrCreateDistributionSetType(final String dsTypeKe
final Collection mandatory, final Collection optional) {
return distributionSetTypeManagement.getByKey(dsTypeKey)
.orElseGet(() -> distributionSetTypeManagement.create(entityFactory.distributionSetType().create()
- .key(dsTypeKey).name(dsTypeName).description(LOREM.words(10)).colour("black")
+ .key(dsTypeKey).name(dsTypeName).description(randomDescriptionShort()).colour("black")
.optional(optional.stream().map(SoftwareModuleType::getId).collect(Collectors.toList()))
.mandatory(mandatory.stream().map(SoftwareModuleType::getId).collect(Collectors.toList()))));
}
/**
* Finds {@link SoftwareModuleType} in repository with given
- * {@link SoftwareModuleType#getKey()} or creates if it does not exist yet with
- * {@link SoftwareModuleType#getMaxAssignments()} = 1.
+ * {@link SoftwareModuleType#getKey()} or creates if it does not exist yet
+ * with {@link SoftwareModuleType#getMaxAssignments()} = 1.
*
* @param key
* {@link SoftwareModuleType#getKey()}
@@ -796,9 +801,10 @@ public SoftwareModuleType findOrCreateSoftwareModuleType(final String key) {
* @return persisted {@link SoftwareModuleType}
*/
public SoftwareModuleType findOrCreateSoftwareModuleType(final String key, final int maxAssignments) {
- return softwareModuleTypeManagement.getByKey(key).orElseGet(
- () -> softwareModuleTypeManagement.create(entityFactory.softwareModuleType().create().key(key).name(key)
- .description(LOREM.words(10)).colour("#ffffff").maxAssignments(maxAssignments)));
+ return softwareModuleTypeManagement.getByKey(key)
+ .orElseGet(() -> softwareModuleTypeManagement.create(entityFactory.softwareModuleType().create()
+ .key(key).name(key).description(randomDescriptionShort()).colour("#ffffff")
+ .maxAssignments(maxAssignments)));
}
/**
@@ -817,9 +823,9 @@ public SoftwareModuleType findOrCreateSoftwareModuleType(final String key, final
*/
public DistributionSet createDistributionSet(final String name, final String version,
final DistributionSetType type, final Collection modules) {
- return distributionSetManagement.create(
- entityFactory.distributionSet().create().name(name).version(version).description(LOREM.words(10))
- .type(type).modules(modules.stream().map(SoftwareModule::getId).collect(Collectors.toList())));
+ return distributionSetManagement.create(entityFactory.distributionSet().create().name(name).version(version)
+ .description(randomDescriptionShort()).type(type)
+ .modules(modules.stream().map(SoftwareModule::getId).collect(Collectors.toList())));
}
/**
@@ -841,8 +847,9 @@ public DistributionSet createDistributionSet(final String name, final String ver
public DistributionSet generateDistributionSet(final String name, final String version,
final DistributionSetType type, final Collection modules,
final boolean requiredMigrationStep) {
- return entityFactory.distributionSet().create().name(name).version(version).description(LOREM.words(10))
- .type(type).modules(modules.stream().map(SoftwareModule::getId).collect(Collectors.toList()))
+ return entityFactory.distributionSet().create().name(name).version(version)
+ .description(randomDescriptionShort()).type(type)
+ .modules(modules.stream().map(SoftwareModule::getId).collect(Collectors.toList()))
.requiredMigrationStep(requiredMigrationStep).build();
}
@@ -879,8 +886,9 @@ public DistributionSet generateDistributionSet(final String name) {
}
/**
- * Creates {@link Target}s in repository and with {@link #DEFAULT_CONTROLLER_ID}
- * as prefix for {@link Target#getControllerId()}.
+ * Creates {@link Target}s in repository and with
+ * {@link #DEFAULT_CONTROLLER_ID} as prefix for
+ * {@link Target#getControllerId()}.
*
* @param number
* of {@link Target}s to create
@@ -966,7 +974,8 @@ private List generateTargets(final int start, final int numberOfTargets,
/**
* Builds {@link Target} objects with given prefix for
- * {@link Target#getControllerId()} followed by a number suffix starting with 0.
+ * {@link Target#getControllerId()} followed by a number suffix starting
+ * with 0.
*
* @param numberOfTargets
* of {@link Target}s to generate
@@ -1014,7 +1023,8 @@ public List createTargets(final int numberOfTargets, final String contro
}
private List createTargets(final Collection targetCreates) {
- // init new instance of array list since the TargetManagement#create will
+ // init new instance of array list since the TargetManagement#create
+ // will
// provide a unmodifiable list
final List createdTargets = targetManagement.create(targetCreates);
return new ArrayList<>(createdTargets);
@@ -1091,7 +1101,8 @@ private Action sendUpdateActionStatusToTarget(final Status status, final Action
}
/**
- * Append {@link ActionStatus} to all {@link Action}s of given {@link Target}s.
+ * Append {@link ActionStatus} to all {@link Action}s of given
+ * {@link Target}s.
*
* @param targets
* to add {@link ActionStatus}
@@ -1108,7 +1119,8 @@ public List sendUpdateActionStatusToTargets(final Collection tar
}
/**
- * Append {@link ActionStatus} to all {@link Action}s of given {@link Target}s.
+ * Append {@link ActionStatus} to all {@link Action}s of given
+ * {@link Target}s.
*
* @param targets
* to add {@link ActionStatus}
@@ -1187,8 +1199,8 @@ public Rollout createRolloutByVariables(final String rolloutName, final String r
* @param weight
* weight of the Rollout
* @param confirmationRequired
- * if the confirmation is required (considered with confirmation flow
- * active)
+ * if the confirmation is required (considered with confirmation
+ * flow active)
* @return created {@link Rollout}
*/
public Rollout createRolloutByVariables(final String rolloutName, final String rolloutDescription,
@@ -1216,8 +1228,8 @@ public Rollout createRolloutByVariables(final String rolloutName, final String r
* {@link Target}s.
*
* @param prefix
- * for rollouts name, description, {@link Target#getControllerId()}
- * filter
+ * for rollouts name, description,
+ * {@link Target#getControllerId()} filter
* @return created {@link Rollout}
*/
public Rollout createRollout(final String prefix) {
@@ -1338,17 +1350,17 @@ public Rollout createSimpleTestRolloutWithTargetsAndDistributionSet(final int am
createTargets(amountTargetsForRollout, "rollout-" + suffix + "-", "rollout");
createTargets(amountOtherTargets, "others-" + suffix + "-", "rollout");
final String filterQuery = "controllerId==rollout-" + suffix + "-*";
- return createRolloutByVariables("rollout-" + suffix, "test-rollout-description", amountOfGroups,
- filterQuery, rolloutDS, successCondition, errorCondition, actionType, weight, false);
+ return createRolloutByVariables("rollout-" + suffix, "test-rollout-description", amountOfGroups, filterQuery,
+ rolloutDS, successCondition, errorCondition, actionType, weight, false);
}
/**
- * Create the soft deleted {@link Rollout} with a new {@link DistributionSet}
- * and {@link Target}s.
+ * Create the soft deleted {@link Rollout} with a new
+ * {@link DistributionSet} and {@link Target}s.
*
* @param prefix
- * for rollouts name, description, {@link Target#getControllerId()}
- * filter
+ * for rollouts name, description,
+ * {@link Target#getControllerId()} filter
* @return created {@link Rollout}
*/
public Rollout createSoftDeletedRollout(final String prefix) {
@@ -1362,8 +1374,8 @@ public Rollout createSoftDeletedRollout(final String prefix) {
/**
* Finds {@link TargetType} in repository with given
- * {@link TargetType#getName()} or creates if it does not exist yet. No ds types
- * are assigned on creation.
+ * {@link TargetType#getName()} or creates if it does not exist yet. No ds
+ * types are assigned on creation.
*
* @param targetTypeName
* {@link TargetType#getName()}
@@ -1378,8 +1390,8 @@ public TargetType findOrCreateTargetType(final String targetTypeName) {
/**
* Creates {@link TargetType} in repository with given
- * {@link TargetType#getName()}. Compatible distribution set types are assigned
- * on creation
+ * {@link TargetType#getName()}. Compatible distribution set types are
+ * assigned on creation
*
* @param targetTypeName
* {@link TargetType#getName()}
@@ -1411,8 +1423,8 @@ public List createTargetTypes(final String targetTypePrefix, final i
}
/**
- * Creates a distribution set and directly invalidates it. No actions will be
- * canceled and no rollouts will be stopped with this invalidation.
+ * Creates a distribution set and directly invalidates it. No actions will
+ * be canceled and no rollouts will be stopped with this invalidation.
*
* @return created invalidated {@link DistributionSet}
*/
@@ -1424,14 +1436,27 @@ public DistributionSet createAndInvalidateDistributionSet() {
}
/**
- * Creates a distribution set that has no software modules assigned, so it is
- * incomplete.
+ * Creates a distribution set that has no software modules assigned, so it
+ * is incomplete.
*
* @return created incomplete {@link DistributionSet}
*/
public DistributionSet createIncompleteDistributionSet() {
return distributionSetManagement.create(entityFactory.distributionSet().create()
- .name(UUID.randomUUID().toString()).version(DEFAULT_VERSION).description(LOREM.words(10))
+ .name(UUID.randomUUID().toString()).version(DEFAULT_VERSION).description(randomDescriptionShort())
.type(findOrCreateDefaultTestDsType()).requiredMigrationStep(false));
}
+
+ private static String randomDescriptionShort() {
+ return randomText(100);
+ }
+
+ private static String randomDescriptionLong() {
+ return randomText(200);
+ }
+
+ private static String randomText(final int len) {
+ return RandomStringUtils.randomAlphanumeric(len);
+ }
+
}
diff --git a/pom.xml b/pom.xml
index a7ce323f8a..4323ea7a70 100644
--- a/pom.xml
+++ b/pom.xml
@@ -203,7 +203,6 @@
30.1.1-jre
2.2.4
1.1.7
- 1.1
2.11.0
2.1.0
3.1.2
@@ -734,11 +733,6 @@
corn-cps
${corn-cps.version}
-
- net._01001111
- jlorem
- ${jlorem.version}
-
com.github.gwtd3
gwt-d3-api