From 1cb170ce0207d38d76a81f1be11f95a45813f212 Mon Sep 17 00:00:00 2001 From: Pranav K Date: Wed, 18 Feb 2015 11:36:51 -0800 Subject: [PATCH] Add delay after _GlobalImport is deleted to allow file system watcher to react --- .../PrecompilationTest.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs b/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs index 4d77b7f2bd..d41c55b839 100644 --- a/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs +++ b/test/Microsoft.AspNet.Mvc.FunctionalTests/PrecompilationTest.cs @@ -126,14 +126,15 @@ namespace Microsoft.AspNet.Mvc.FunctionalTests // Act - 8 // Remove new _GlobalImport file File.Delete(newGlobalImport); + await Task.Delay(_cacheDelayInterval); responseContent = await client.GetStringAsync("http://localhost/Home/Index"); // Assert - 8 // Everything should've recompiled. var response8 = new ParsedResponse(responseContent); - Assert.NotEqual(response6.ViewStart, response7.ViewStart); - Assert.NotEqual(response6.Index, response7.Index); - Assert.NotEqual(response6.Layout, response7.Layout); + Assert.NotEqual(response7.ViewStart, response8.ViewStart); + Assert.NotEqual(response7.Index, response8.Index); + Assert.NotEqual(response7.Layout, response8.Layout); // Act - 9 // Refetch and verify we get cached types