Skip to content

Commit

Permalink
kie-kogito-runtimes-3388: Improve serverless workflows timeouts durat…
Browse files Browse the repository at this point in the history
…ion validation message (#3433)

* kie-kogito-runtimes-3388: Improve serverless workflows timeouts duration validation message

* Formatting fixes in classes not related to this PR
  • Loading branch information
wmedvede authored Mar 11, 2024
1 parent 0ff99d1 commit ccdd173
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,10 @@
public class TimeoutsConfigResolver {

private static final String NON_NEGATIVE_DURATION_MUST_BE_PROVIDED =
"When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S. Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow";
"When configured, it must be set with a greater than zero ISO 8601 time duration. For example PT30S." +
" Or a valid expression, for example $CONST.myDuration, where 'myDuration' is defined in the constant section of the workflow." +
" Note: month based durations like P2M (period of two months) are not valid since the month duration might vary." +
" In that case you can use PT60D instead.";

private static final String INVALID_EVENT_TIMEOUT_FOR_STATE_ERROR = "An invalid \"eventTimeout\": \"%s\" configuration was provided for the state \"%s\" in the serverless workflow: \"%s\"." +
NON_NEGATIVE_DURATION_MUST_BE_PROVIDED;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ public class KogitoAssetsProcessor {
@BuildStep
public KogitoBuildContextBuildItem generateKogitoBuildContext(List<KogitoBuildContextAttributeBuildItem> attributes) {
// configure the application generator
PathCollection rootPaths = getRootPaths( root.getResolvedPaths());
PathCollection rootPaths = getRootPaths(root.getResolvedPaths());
KogitoBuildContext context =
kogitoBuildContext(outputTargetBuildItem.getOutputDirectory(),
rootPaths,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@
import java.nio.file.Path;
import java.util.Arrays;

import org.junit.jupiter.api.Test;

import io.quarkus.bootstrap.model.PathsCollection;
import io.quarkus.paths.PathCollection;
import org.junit.jupiter.api.Test;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;
Expand Down Expand Up @@ -43,4 +44,4 @@ void getRootPathsWithClasses() {
String expectedPath = String.format("%s/%s/generated-resources", projectDirPath, outputTargetPath).replace("/", File.separator);
assertTrue(retrieved.contains(Path.of(expectedPath)));
}
}
}

0 comments on commit ccdd173

Please sign in to comment.