Skip to content

Commit fb32446

Browse files
committed
Missed some changes from unloaded projects
1 parent c6456c1 commit fb32446

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

src/NServiceBus.AcceptanceTesting/AcceptanceTestingPersistence/AcceptanceTestingSynchronizedStorageSession.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,11 @@ class AcceptanceTestingSynchronizedStorageSession : ICompletableSynchronizedStor
1313
{
1414
public AcceptanceTestingTransaction Transaction { get; private set; }
1515

16-
public void Dispose() => Transaction = null;
16+
public ValueTask DisposeAsync()
17+
{
18+
Transaction = null;
19+
return ValueTask.CompletedTask;
20+
}
1721

1822
public ValueTask<bool> TryOpen(IOutboxTransaction transaction, ContextBag context,
1923
CancellationToken cancellationToken = default)

src/NServiceBus.AcceptanceTests/Core/Reliability/SynchronizedStorage/When_opening_storage_session_outside_pipeline.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ public MyTask(Context scenarioContext, IServiceProvider provider)
8585
protected override async Task OnStart(IMessageSession session, CancellationToken cancellationToken = default)
8686
{
8787
using (var scope = provider.CreateScope())
88-
using (var completableSynchronizedStorageSession =
88+
await using (var completableSynchronizedStorageSession =
8989
scope.ServiceProvider.GetRequiredService<ICompletableSynchronizedStorageSession>())
9090
{
9191
await completableSynchronizedStorageSession.Open(new ContextBag(), cancellationToken);

src/NServiceBus.Core.Tests/Fakes/FakeSynchronizedStorageSession.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
using Outbox;
1010
using Transport;
1111

12-
public class FakeSynchronizedStorageSession : ICompletableSynchronizedStorageSession
12+
public sealed class FakeSynchronizedStorageSession : ICompletableSynchronizedStorageSession
1313
{
1414
public FakeSynchronizedStorageSession(FakeTransaction transaction)
1515
{
@@ -58,10 +58,10 @@ public Task Open(ContextBag context, CancellationToken cancellationToken = defau
5858
return Task.CompletedTask;
5959
}
6060

61-
public void Dispose()
61+
public ValueTask DisposeAsync()
6262
{
6363
Transaction = null;
64-
GC.SuppressFinalize(this);
64+
return ValueTask.CompletedTask;
6565
}
6666

6767
public Task CompleteAsync(CancellationToken cancellationToken = default)

0 commit comments

Comments
 (0)