Skip to content

Commit

Permalink
Fix TestsManifestGeneration tests (#46658)
Browse files Browse the repository at this point in the history
* Flush before checking for manifest data

* add comments
  • Loading branch information
sywhang authored Jan 7, 2021
1 parent 604660b commit 1d0f67f
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@ public void Test_EventSource_EtwManifestGeneration()
Thread.Sleep(TimeSpan.FromSeconds(5));

tracesession.Flush();

// Sleep after requesting flush to ensure that the manifest payload generated
// is fully written to the etl file.
Thread.Sleep(TimeSpan.FromSeconds(5));

tracesession.DisableProvider("SimpleEventSource");
tracesession.Dispose();

Expand Down Expand Up @@ -87,6 +92,10 @@ public void Test_EventSource_EtwManifestGenerationRollover()

tracesession.Flush();

// Sleep after requesting flush to ensure that the manifest payload generated
// is fully written to the etl file.
Thread.Sleep(TimeSpan.FromSeconds(5));

tracesession.SetFileName(rolloverFile);

Thread.Sleep(TimeSpan.FromSeconds(5));
Expand Down

0 comments on commit 1d0f67f

Please sign in to comment.