From 01b64b9fc1414ce5986c82a698fc8dc882edc7ed Mon Sep 17 00:00:00 2001 From: Peter Csajtai Date: Wed, 6 Apr 2022 00:37:14 +0200 Subject: [PATCH] Update OverrideTests.cs --- src/ConfigCat.Client.Tests/OverrideTests.cs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ConfigCat.Client.Tests/OverrideTests.cs b/src/ConfigCat.Client.Tests/OverrideTests.cs index 73b4ee4b..61f31022 100644 --- a/src/ConfigCat.Client.Tests/OverrideTests.cs +++ b/src/ConfigCat.Client.Tests/OverrideTests.cs @@ -1,7 +1,6 @@ using Microsoft.VisualStudio.TestTools.UnitTesting; using System.Collections.Generic; using System.IO; -using System.Threading; using System.Threading.Tasks; namespace ConfigCat.Client.Tests @@ -361,9 +360,9 @@ public async Task LocalFile_Watcher_Reload() }); Assert.AreEqual("initial", await client.GetValueAsync("fakeKey", string.Empty)); - + await Task.Delay(100); await WriteContent(SampleFileToCreate, "modified"); - Thread.Sleep(3000); + await Task.Delay(1500); Assert.AreEqual("modified", await client.GetValueAsync("fakeKey", string.Empty)); @@ -383,9 +382,9 @@ public async Task LocalFile_Watcher_Reload_Sync() }); Assert.AreEqual("initial", client.GetValue("fakeKey", string.Empty)); - - await WriteContent(SampleFileToCreate, "modified"); - Thread.Sleep(3000); + await Task.Delay(100); + await WriteContent(SampleFileToCreate, "modified"); + await Task.Delay(1500); Assert.AreEqual("modified", client.GetValue("fakeKey", string.Empty));