Feature/speedup quota tests (#1125)
* reduce the number of created entities in tests Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * fixed tests Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * fixed review findings Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * merged master Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * adapted target count Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * fixed review findings Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * fixed RolloutManagementTest Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io> * fixed flaky test ConcurrentDistributionSetInvalidationTest Signed-off-by: Ahmed Sayed <ahmed.sayed@bosch.io>
This commit is contained in:
@@ -170,7 +170,7 @@ public class DdiArtifactDownloadTest extends AbstractDDiApiIntegrationTest {
|
||||
final DistributionSet ds = testdataFactory.createDistributionSet("");
|
||||
|
||||
// create artifact
|
||||
final int artifactSize = 5 * 1024 * 1024;
|
||||
final int artifactSize = (int) quotaManagement.getMaxArtifactSize();
|
||||
final byte random[] = RandomUtils.nextBytes(artifactSize);
|
||||
final Artifact artifact = artifactManagement.create(new ArtifactUpload(new ByteArrayInputStream(random),
|
||||
ds.findFirstModuleByType(osType).get().getId(), "file1", false, artifactSize));
|
||||
@@ -238,7 +238,7 @@ public class DdiArtifactDownloadTest extends AbstractDDiApiIntegrationTest {
|
||||
// create ds
|
||||
final DistributionSet ds = testdataFactory.createDistributionSet("");
|
||||
|
||||
final int resultLength = 5 * 1000 * 1024;
|
||||
final int resultLength = (int) quotaManagement.getMaxArtifactSize();
|
||||
|
||||
// create artifact
|
||||
final byte random[] = RandomUtils.nextBytes(resultLength);
|
||||
@@ -250,7 +250,7 @@ public class DdiArtifactDownloadTest extends AbstractDDiApiIntegrationTest {
|
||||
// now assign and download successful
|
||||
assignDistributionSet(ds, targets);
|
||||
|
||||
final int range = 100 * 1024;
|
||||
final int range = resultLength / 50;
|
||||
|
||||
// full file download with standard range request
|
||||
final ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
|
||||
|
||||
@@ -493,7 +493,7 @@ public class DdiDeploymentBaseTest extends AbstractDDiApiIntegrationTest {
|
||||
.get(0);
|
||||
|
||||
final List<String> messages = new ArrayList<>();
|
||||
for (int i = 0; i < 51; i++) {
|
||||
for (int i = 0; i < quotaManagement.getMaxMessagesPerActionStatus() + 1; i++) {
|
||||
messages.add(String.valueOf(i));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user