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); }); }