Reformat/cleanup
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
All checks were successful
NuGet Package Publish / nuget (push) Successful in 1m10s
This commit is contained in:
@@ -7,12 +7,12 @@ namespace ZB.MOM.WW.CBDDC.Sample.Console.Tests;
|
||||
|
||||
public class PeerOplogConfirmationStoreTests : IDisposable
|
||||
{
|
||||
private readonly string _testDbPath;
|
||||
private readonly SampleDbContext _context;
|
||||
private readonly BLitePeerOplogConfirmationStore<SampleDbContext> _store;
|
||||
private readonly string _testDbPath;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="PeerOplogConfirmationStoreTests"/> class.
|
||||
/// Initializes a new instance of the <see cref="PeerOplogConfirmationStoreTests" /> class.
|
||||
/// </summary>
|
||||
public PeerOplogConfirmationStoreTests()
|
||||
{
|
||||
@@ -23,8 +23,22 @@ public class PeerOplogConfirmationStoreTests : IDisposable
|
||||
NullLogger<BLitePeerOplogConfirmationStore<SampleDbContext>>.Instance);
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
_context?.Dispose();
|
||||
if (File.Exists(_testDbPath))
|
||||
try
|
||||
{
|
||||
File.Delete(_testDbPath);
|
||||
}
|
||||
catch
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that ensuring peer registration multiple times remains idempotent.
|
||||
/// Verifies that ensuring peer registration multiple times remains idempotent.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task EnsurePeerRegisteredAsync_IsIdempotent()
|
||||
@@ -41,7 +55,7 @@ public class PeerOplogConfirmationStoreTests : IDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies create, update, and read flows for peer oplog confirmations.
|
||||
/// Verifies create, update, and read flows for peer oplog confirmations.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task ConfirmationStore_CrudFlow_Works()
|
||||
@@ -74,7 +88,7 @@ public class PeerOplogConfirmationStoreTests : IDisposable
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Verifies that removing peer tracking deactivates tracking records for that peer.
|
||||
/// Verifies that removing peer tracking deactivates tracking records for that peer.
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public async Task RemovePeerTrackingAsync_DeactivatesPeerTracking()
|
||||
@@ -95,14 +109,4 @@ public class PeerOplogConfirmationStoreTests : IDisposable
|
||||
peerARows.ShouldNotBeEmpty();
|
||||
peerARows.All(x => !x.IsActive).ShouldBeTrue();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
public void Dispose()
|
||||
{
|
||||
_context?.Dispose();
|
||||
if (File.Exists(_testDbPath))
|
||||
{
|
||||
try { File.Delete(_testDbPath); } catch { }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user