Skip to content

Commit

Permalink
Making sure that Wolverine.HTTP can flush cascading messages when usi…
Browse files Browse the repository at this point in the history
…ng a non-Marten message storage. Closes GH-1184
  • Loading branch information
jeremydmiller committed Dec 28, 2024
1 parent 82277c0 commit bac2472
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Http/Wolverine.Http/HttpChain.Codegen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ internal IEnumerable<Frame> DetermineFrames(GenerationRules rules)
.Select(x => x.ReturnAction(this)).SelectMany(x => x.Frames()).ToArray();
foreach (var frame in actionsOnOtherReturnValues) yield return frame;

if (Postprocessors.Any(x => x.MaySendMessages()))
if (Postprocessors.Concat(actionsOnOtherReturnValues).Any(x => x.MaySendMessages()))
{
var flush = Postprocessors.OfType<FlushOutgoingMessages>().FirstOrDefault();
if (flush != null)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFrameworks>net9.0</TargetFrameworks>
</PropertyGroup>

<PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Samples/EFCoreSample/ItemService.Tests/end_to_end.cs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ await host.Scenario(x =>
x.Post.Json(command).ToUrl("/items/create4");
x.StatusCodeShouldBe(204);
});
});
});

tracked.FindSingleTrackedMessageOfType<ItemCreated>()
.ShouldNotBeNull();
Expand Down
18 changes: 16 additions & 2 deletions src/Samples/EFCoreSample/ItemService/ItemService.csproj
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
<Project Sdk="Microsoft.NET.Sdk.Web">

<PropertyGroup>
<TargetFrameworks>net9.0</TargetFrameworks>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0"/>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.1"/>
</ItemGroup>

<ItemGroup>
Expand All @@ -11,4 +13,16 @@
<ProjectReference Include="..\..\..\Persistence\Wolverine.SqlServer\Wolverine.SqlServer.csproj"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="[7.0.1, 9.0.0)"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.11"/>
</ItemGroup>

<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0"/>
</ItemGroup>

</Project>

0 comments on commit bac2472

Please sign in to comment.