Skip to content

Commit

Permalink
Saga handlers *never* respect the multiple handlers Separated feature.
Browse files Browse the repository at this point in the history
…Closes GH-1235
  • Loading branch information
jeremydmiller committed Jan 21, 2025
1 parent b77b94e commit ff5a72a
Show file tree
Hide file tree
Showing 119 changed files with 30 additions and 6,011 deletions.

This file was deleted.

This file was deleted.

1 change: 1 addition & 0 deletions src/Http/Wolverine.Http.Tests/Wolverine.Http.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@

<ItemGroup>
<Compile Remove="Bugs\Bug_748_using_side_effect_in_tuple.cs"/>
<Compile Remove="AlbaExtensions.cs" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Alba;
using Shouldly;
using Wolverine.Tracking;
using WolverineWebApi;

namespace Wolverine.Http.Tests;
Expand All @@ -12,14 +14,24 @@ public building_a_saga_and_publishing_other_messages_from_http_endpoint(AppFixtu
[Fact]
public async Task can_create_saga_and_publish_message()
{
await Host.GetRuntime().Storage.Admin.ClearAllAsync();
await Store.Advanced.Clean.DeleteDocumentsByTypeAsync(typeof(Reservation));

var (tracked, result) = await TrackedHttpCall(x =>
{
x.Post.Json(new StartReservation("dinner")).ToUrl("/reservation");
});
IScenarioResult result = null!;

tracked.Sent.SingleMessage<ReservationTimeout>().ShouldNotBeNull();
Func<IMessageContext, Task> action = async _ =>
{
result = await Host.Scenario(x =>
{
x.Post.Json(new StartReservation("dinner")).ToUrl("/reservation");
});
};

// The outer part is tying into Wolverine's test support
// to "wait" for all detected message activity to complete
await Host
.TrackActivity()
.ExecuteAndWaitAsync(action);

using var session = Store.LightweightSession();
var reservation = await session.LoadAsync<Reservation>("dinner");
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit ff5a72a

Please sign in to comment.