Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 3550 - Allow no writers in deployAll system test #3594

Merged
merged 3 commits into from
Nov 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public void runTasksOrThrow() throws AmazonClientException {
LOGGER.info("Creating {} tasks", numberOfTasksToCreate);
try {
int remainingTasks = numberOfTasksToCreate;
while (true) {
while (remainingTasks > 0) {

try {
remainingTasks = retryTaskUntilCapacityAvailable(remainingTasks);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,15 @@ void shouldConsumeResults() {
.extracting(RunTaskResponse::tasks, RunTaskResponse::failures)
.containsExactly(tuple(List.of(), List.of()));
}

@Test
void shouldRunNoTasks() {
runTasksOrThrow(runTasks -> runTasks
.runTaskRequest(request -> request.cluster("test-cluster"))
.numberOfTasksToCreate(0));

verify(0, anyRequest());
}
}

@Nested
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,13 +111,13 @@ public interface SystemTestProperty extends InstanceProperty {
.build();
SystemTestProperty NUMBER_OF_WRITERS = Index.propertyBuilder("sleeper.systemtest.writers")
.description("The number of containers that write random data")
.defaultValue("1").validationPredicate(SleeperPropertyValueUtils::isPositiveInteger).build();
.defaultValue("1").validationPredicate(SleeperPropertyValueUtils::isNonNegativeInteger).build();
SystemTestProperty NUMBER_OF_INGESTS_PER_WRITER = Index.propertyBuilder("sleeper.systemtest.ingests.per.writer")
.description("The number of ingests to run for each writer")
.defaultValue("1").validationPredicate(SleeperPropertyValueUtils::isPositiveInteger).build();
.defaultValue("1").validationPredicate(SleeperPropertyValueUtils::isNonNegativeInteger).build();
SystemTestProperty NUMBER_OF_RECORDS_PER_INGEST = Index.propertyBuilder("sleeper.systemtest.records.per.ingest")
.description("The number of random records that each ingest should write")
.defaultValue("100").validationPredicate(SleeperPropertyValueUtils::isPositiveInteger).build();
.defaultValue("100").validationPredicate(SleeperPropertyValueUtils::isNonNegativeInteger).build();
SystemTestProperty MIN_RANDOM_INT = Index.propertyBuilder("sleeper.systemtest.random.int.min")
.description("The minimum value of integers generated randomly during random record generation")
.defaultValue("0").validationPredicate(SleeperPropertyValueUtils::isInteger).build();
Expand Down
Loading