Skip to content
Open
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 @@ -151,7 +151,7 @@ public function notify(string $userId): void
)
->expectNoSpanNamed('process class@anonymous::register')
->withNoOtherSpans(),
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('async_channel', ExecutionPollingMetadata::createWithTestingSetup(handledMessageLimit: 2)))
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('async_channel', ExecutionPollingMetadata::createWithFinishWhenNoMessages()))
->expect(
ExpectedSpan::named('receive async_channel')->ofKind(SpanKind::Consumer)->containing(
ExpectedSpan::named('process class@anonymous::register')->withAttributes([SpanAttribute::ENDPOINT_ID => 'user.registration'])->containing(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ public function register(string $userId): void
ServiceConfiguration::createWithDefaults()->withDefaultErrorChannel('error_channel'),
], [
self::registrationSentToTheQueue(),
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('users', ExecutionPollingMetadata::createWithTestingSetup(stopOnError: false)))
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('users', ExecutionPollingMetadata::createWithFinishWhenNoMessages(stopOnError: false)))
->failingWith('Exception on send')
->expect(
ExpectedSpan::named('receive users')->ofKind(SpanKind::Consumer)->withStatus(SpanStatus::Error)->containing(
Expand Down
2 changes: 1 addition & 1 deletion packages/Ecotone/src/Test/Flow/ChannelFlowScenarios.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ public function place(string $orderId): void
)
->withNoOtherSpans()
->leavingWorkPending(),
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('orders', ExecutionPollingMetadata::createWithTestingSetup(handledMessageLimit: 2)))
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('orders', ExecutionPollingMetadata::createWithFinishWhenNoMessages()))
->expect(
ExpectedSpan::named('send orders_a')->containing(ExpectedSpan::named('receive orders')->withAttributes(['flowId' => '1'])->containing(ExpectedSpan::named('process class@anonymous::place'))),
ExpectedSpan::named('send orders_b')->containing(ExpectedSpan::named('receive orders')->withAttributes(['flowId' => '2'])->containing(ExpectedSpan::named('process class@anonymous::place'))),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ private static function failureRetriedWithDelayThenSentToDeadLetter(): FlowScena
->expect(self::queued())
->withNoOtherSpans()
->leavingWorkPending(),
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('orders', ExecutionPollingMetadata::createWithTestingSetup(stopOnError: false)))
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('orders', ExecutionPollingMetadata::createWithFinishWhenNoMessages(stopOnError: false)))
->expect(
ExpectedSpan::named('receive orders')->withStatus(SpanStatus::Error)->containing(
ExpectedSpan::named('process class@anonymous::place')->withStatus(SpanStatus::Error, 'Order cannot be placed'),
Expand Down
2 changes: 1 addition & 1 deletion packages/Ecotone/src/Test/Flow/TraceFlowScenarios.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ private static function twoAsynchronousCommandsKeepTheirOwnTraces(): FlowScenari
return new FlowScenario('two asynchronous commands consumed in one run keep their own traces', [$users::class], [$users], [SimpleMessageChannelBuilder::createQueueChannel('users')], [
$send('1'),
$send('2'),
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('users', ExecutionPollingMetadata::createWithTestingSetup(handledMessageLimit: 2)))
FlowStage::when(fn (FlowTestSupport $ecotone) => $ecotone->run('users', ExecutionPollingMetadata::createWithFinishWhenNoMessages()))
->expect($consumed('1'), $consumed('2')),
]);
}
Expand Down
Loading