Skip to content
Merged
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 @@ -55,7 +55,8 @@ static void tearDown() {
// ========== DurationInline Tests ==========

@Test
@Disabled("This one slow down")
@Disabled(
"Disabled because it waits 1s and slows the suite; DSL mapping is covered by testWaitSecondsConvenienceMethod")
void testWaitWithDurationInlineSeconds() {
Workflow workflow =
WorkflowBuilder.workflow("wait-inline-seconds", "test", "0.1.0")
Expand Down Expand Up @@ -87,7 +88,6 @@ void testWaitWithDurationInlineMilliseconds() {

@Test
void testWaitWithDurationInlineComposite() {
// Test composite duration with multiple components
Workflow workflow =
WorkflowBuilder.workflow("wait-inline-composite", "test", "0.1.0")
.tasks(DSL.wait(Duration.ofMillis(100).plusMillis(100)))
Expand All @@ -98,7 +98,7 @@ void testWaitWithDurationInlineComposite() {
long elapsed = System.currentTimeMillis() - startTime;

assertThat(model).isNotNull();
assertThat(elapsed).isGreaterThanOrEqualTo(200); // 1 second + 500 milliseconds
assertThat(elapsed).isGreaterThanOrEqualTo(200);
}

// ========== DurationLiteral Tests (TimeoutAfter.durationLiteral) ==========
Expand All @@ -122,25 +122,6 @@ void testWaitWithDurationLiteralISO8601Seconds() {
assertThat(elapsed).isGreaterThanOrEqualTo(1000);
}

@Test
void testWaitWithDurationLiteralISO8601Composite() {
Comment thread
fjtirado marked this conversation as resolved.
Workflow workflow =
WorkflowBuilder.workflow("wait-literal-composite", "test", "0.1.0")
.tasks(
list ->
list.wait(
w ->
w.build().setWait(new TimeoutAfter().withDurationExpression("PT0.1S"))))
.build();

long startTime = System.currentTimeMillis();
WorkflowModel model = appl.workflowDefinition(workflow).instance(Map.of()).start().join();
long elapsed = System.currentTimeMillis() - startTime;

assertThat(model).isNotNull();
assertThat(elapsed).isGreaterThanOrEqualTo(100);
}

@Test
void testWaitWithDurationLiteralISO8601Milliseconds() {
// PT0.1S = 100 milliseconds
Expand Down
Loading