From ec0346546c71ab43bd4fc0d364943ee5601b65d0 Mon Sep 17 00:00:00 2001 From: Robert Voinescu Date: Mon, 20 Apr 2026 23:06:07 +0000 Subject: [PATCH] fix(NLog): Remove WaitAsync for net462 compatibility --- .../GoogleStackdriverTargetTest.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/apis/Google.Cloud.Logging.NLog/Google.Cloud.Logging.NLog.Tests/GoogleStackdriverTargetTest.cs b/apis/Google.Cloud.Logging.NLog/Google.Cloud.Logging.NLog.Tests/GoogleStackdriverTargetTest.cs index 9e4264360d2e..d4dcb4702120 100644 --- a/apis/Google.Cloud.Logging.NLog/Google.Cloud.Logging.NLog.Tests/GoogleStackdriverTargetTest.cs +++ b/apis/Google.Cloud.Logging.NLog/Google.Cloud.Logging.NLog.Tests/GoogleStackdriverTargetTest.cs @@ -770,7 +770,7 @@ public async Task GaePlatform_NoConfiguredProjectId() Assert.Equal("gae_project_id", uploadedEntries[0].LogNameAsLogName.ProjectId); } - [Fact] + [Fact(Timeout = 2000)] public async Task Flush_AwaitsAllTasks() { var pendingUpload = new TaskCompletionSource(); @@ -795,8 +795,7 @@ await RunTest( // Complete Msg 2; Flush should now finish. pendingUpload.SetResult(new WriteLogEntriesResponse()); - await flushFinished.Task.WaitAsync(TimeSpan.FromSeconds(2)); - + await flushFinished.Task; Assert.Equal(2, uploadCount); }); }