Skip to content

Commit 27c1686

Browse files
committed
Use explicit IAsyncLifetime/IAsyncDisposable
Convert public async Task InitializeAsync/DisposeAsync methods to explicit interface implementations returning ValueTask (IAsyncLifetime.InitializeAsync and IAsyncDisposable.DisposeAsync). This hides the lifecycle methods from the public surface of the test class and aligns the test teardown/initialization with async disposal/lifecycle patterns.
1 parent ba31be2 commit 27c1686

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/Zetian.Tests/SmtpServerRaceConditionTests.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ public SmtpServerRaceConditionTests()
2222
_testPort = TestHelper.GetAvailablePort();
2323
}
2424

25-
public async Task InitializeAsync()
25+
async ValueTask IAsyncLifetime.InitializeAsync()
2626
{
2727
// Each test will create its own server to avoid interference
2828
await Task.CompletedTask;
2929
}
3030

31-
public async Task DisposeAsync()
31+
async ValueTask IAsyncDisposable.DisposeAsync()
3232
{
3333
if (_server != null)
3434
{

0 commit comments

Comments
 (0)