From fc84f765bd9015517a4af8c82e2cd3eaac8f6d8b Mon Sep 17 00:00:00 2001 From: Luke Bakken Date: Wed, 31 Aug 2022 12:16:37 -0700 Subject: [PATCH] Use correct HTTP client result in XunitException message --- Tests/Utils.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tests/Utils.cs b/Tests/Utils.cs index 9457bc39..673a7f51 100644 --- a/Tests/Utils.cs +++ b/Tests/Utils.cs @@ -220,10 +220,10 @@ public static async Task HttpKillConnections(string connectionName) * https://stackoverflow.com/a/4550600 */ var s = Uri.EscapeDataString(conn.name); - var r = await client.DeleteAsync($"http://localhost:15672/api/connections/{s}"); - if (!r.IsSuccessStatusCode) + var deleteResult = await client.DeleteAsync($"http://localhost:15672/api/connections/{s}"); + if (!deleteResult.IsSuccessStatusCode) { - throw new XunitException($"HTTP DELETE failed: {result.StatusCode} {result.ReasonPhrase}"); + throw new XunitException($"HTTP DELETE failed: {deleteResult.StatusCode} {deleteResult.ReasonPhrase}"); } killed += 1;