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