From 863888bfb44619f12709e26881279b1768be7c24 Mon Sep 17 00:00:00 2001 From: Praburaj Date: Tue, 22 Jul 2014 17:23:17 -0700 Subject: [PATCH] Fixing a test failure due to a recent change. Adding some delay for the selfhost tests. With the recent change of merging the dbs selfhost based tests start even before the data is populated into the db & application start. Adding a slight delay to allow the setup finish. And fixing a test bug that was not surfacing. Was checking with a fixed album id. This worked before as the id created was always 453. --- test/E2ETests/DeploymentUtility.cs | 2 ++ test/E2ETests/SmokeTests.cs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/test/E2ETests/DeploymentUtility.cs b/test/E2ETests/DeploymentUtility.cs index beb2d2df3f..c954f38305 100644 --- a/test/E2ETests/DeploymentUtility.cs +++ b/test/E2ETests/DeploymentUtility.cs @@ -150,6 +150,8 @@ namespace E2ETests var watchResult = dbWatch.WaitForChanged(WatcherChangeTypes.Created, 60 * 1000); if (watchResult.ChangeType == WatcherChangeTypes.Created) { + //This event is fired immediately after the localdb file is created. Give it a while to finish populating data and start the application. + Thread.Sleep(2 * 1000); Console.WriteLine("Database file created '{0}'. Proceeding with the tests.", identityDBFullPath); } else diff --git a/test/E2ETests/SmokeTests.cs b/test/E2ETests/SmokeTests.cs index 3140ca4281..07390d531c 100644 --- a/test/E2ETests/SmokeTests.cs +++ b/test/E2ETests/SmokeTests.cs @@ -406,7 +406,7 @@ namespace E2ETests var responseContent = response.Content.ReadAsStringAsync().Result; Assert.Contains(albumName, responseContent, StringComparison.OrdinalIgnoreCase); Assert.Contains("http://myapp/testurl", responseContent, StringComparison.OrdinalIgnoreCase); - Assert.Contains("Edit", responseContent, StringComparison.OrdinalIgnoreCase); + Assert.Contains(string.Format("Edit", albumId), responseContent, StringComparison.OrdinalIgnoreCase); Assert.Contains("Back to List", responseContent, StringComparison.OrdinalIgnoreCase); }