Skip to content

Commit

Permalink
Added extra diagnostic information for occasionally failing Managemen…
Browse files Browse the repository at this point in the history
…tApiRunner tests.
  • Loading branch information
jamesbak committed Jan 5, 2016
1 parent 2efe9b0 commit dddabde
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion DashServer.Tests/ManagementApiRunner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,14 @@ void ExecuteUpdateConfigCore(Func<DashServer.ManagementAPI.Models.Configuration,
NegotiatedContentResult<DashServer.ManagementAPI.Models.Configuration> updateResponse = null;
try
{
updateResponse = this.ConfigController.UpdateConfiguration(updatedConfig).Result as NegotiatedContentResult<DashServer.ManagementAPI.Models.Configuration>;
var response = this.ConfigController.UpdateConfiguration(updatedConfig).Result;
updateResponse = response as NegotiatedContentResult<DashServer.ManagementAPI.Models.Configuration>;
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)
{
Expand Down

0 comments on commit dddabde

Please sign in to comment.