From dddabde52cdf32d992c8157c554216dbe2fc4306 Mon Sep 17 00:00:00 2001 From: "jamesbak@microsoft.com" Date: Mon, 4 Jan 2016 18:19:38 -0800 Subject: [PATCH] Added extra diagnostic information for occasionally failing ManagementApiRunner tests. --- DashServer.Tests/ManagementApiRunner.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/DashServer.Tests/ManagementApiRunner.cs b/DashServer.Tests/ManagementApiRunner.cs index bfc71ad..2d33c13 100644 --- a/DashServer.Tests/ManagementApiRunner.cs +++ b/DashServer.Tests/ManagementApiRunner.cs @@ -88,7 +88,14 @@ void ExecuteUpdateConfigCore(Func updateResponse = null; try { - updateResponse = this.ConfigController.UpdateConfiguration(updatedConfig).Result as NegotiatedContentResult; + var response = this.ConfigController.UpdateConfiguration(updatedConfig).Result; + updateResponse = response as NegotiatedContentResult; + if (updateResponse == null && !this.ExpectedException && !this.ExpectedAbnormalResponse) + { + Assert.Fail("Unexpected response from ConfigurationController.UpdateConfiguration. Response type: {0}. Details: {1}", + response.GetType().FullName, + response); + } } catch (Exception ex) {