Skip to content

Commit

Permalink
Fixed the Helpdesk Api projections configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
oskardudycz committed Sep 3, 2024
1 parent d5ef978 commit bdcc7c6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Helpdesk.Api.Tests.Incidents;

public class LogIncidentsTests(AppFixture fixture): IntegrationContext(fixture)
{
[Fact(Skip = "Need to bump wolverine")]
[Fact]
public async Task LogIncident_ShouldSucceed()
{
var result = await Host.Scenario(x =>
Expand Down
6 changes: 3 additions & 3 deletions Sample/Helpdesk/Helpdesk.Api/Helpdesk.Api.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<PackageReference Include="Microsoft.AspNetCore.SignalR" Version="1.1.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Core.WebApi\Core.WebApi.csproj" />
</ItemGroup>
<!-- <ItemGroup>-->
<!-- <ProjectReference Include="..\..\..\Core.WebApi\Core.WebApi.csproj" />-->
<!-- </ItemGroup>-->
</Project>
15 changes: 8 additions & 7 deletions Sample/Helpdesk/Helpdesk.Api/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
using Marten.AspNetCore;
using Marten.Events;
using Marten.Events.Daemon.Resiliency;
using Marten.Events.Projections;
using Marten.Pagination;
using Marten.Schema.Identity;
using Marten.Storage;
Expand All @@ -34,8 +35,8 @@
builder.Services
.AddEndpointsApiExplorer()
.AddSwaggerGen()
.AddDefaultExceptionHandler()
.AddMarten(sp =>
//.AddDefaultExceptionHandler()
.AddMarten(_ =>
{
var options = new StoreOptions();

Expand All @@ -60,11 +61,11 @@
options.Projections.Errors.SkipSerializationErrors = false;
options.Projections.Errors.SkipUnknownEvents = false;

// options.Projections.LiveStreamAggregation<Incident>();
// options.Projections.Add<IncidentHistoryTransformation>(ProjectionLifecycle.Inline);
// options.Projections.Add<IncidentDetailsProjection>(ProjectionLifecycle.Inline);
// options.Projections.Add<IncidentShortInfoProjection>(ProjectionLifecycle.Inline);
// options.Projections.Add<CustomerIncidentsSummaryProjection>(ProjectionLifecycle.Async);
options.Projections.LiveStreamAggregation<Incident>();
options.Projections.Add<IncidentHistoryTransformation>(ProjectionLifecycle.Inline);
options.Projections.Add<IncidentDetailsProjection>(ProjectionLifecycle.Inline);
options.Projections.Add<IncidentShortInfoProjection>(ProjectionLifecycle.Inline);
options.Projections.Add<CustomerIncidentsSummaryProjection>(ProjectionLifecycle.Async);

options.ApplicationAssembly = typeof(CustomerIncidentsSummaryProjection).Assembly;

Expand Down

0 comments on commit bdcc7c6

Please sign in to comment.