Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Direct commit applicable PR suggestions

Co-authored-by: Chris Gillum <[email protected]>
  • Loading branch information
andystaples and cgillum authored Jan 11, 2025
1 parent f171de5 commit d3f3328
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/e2e/Tests/Constants.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ internal class Constants
{
public static IConfiguration Configuration = TestUtility.GetTestConfiguration();

internal static string FunctionsHostUrl = Configuration["FunctionAppUrl"] ?? "http://localhost:7071";
internal static readonly string FunctionsHostUrl = Configuration["FunctionAppUrl"] ?? "http://localhost:7071";

internal const string FunctionAppCollectionName = "DurableTestsCollection";
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/Tests/Fixtures/FunctionAppFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ public async Task InitializeAsync()
_jobObjectRegistry.Register(this._funcProcess);
}

var httpClient = new HttpClient();
using var httpClient = new HttpClient();
this._logger.LogInformation("Waiting for host to be running...");
await TestUtility.RetryAsync(async () =>
{
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/Tests/Helpers/HttpHelpers.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class HttpHelpers
public static async Task<HttpResponseMessage> InvokeHttpTrigger(string functionName, string queryString = "")
{
// Basic http request
HttpRequestMessage request = GetTestRequest(functionName, queryString);
using HttpRequestMessage request = GetTestRequest(functionName, queryString);
request.Headers.Accept.Add(new MediaTypeWithQualityHeaderValue("text/plain"));
return await GetResponseMessage(request);
}
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/Tests/Tests/HelloCitiesTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public HttpEndToEndTests(FunctionAppFixture fixture, ITestOutputHelper testOutpu
[InlineData("HelloCities_HttpStart", "", HttpStatusCode.Accepted, "")]
public async Task HttpTriggerTests(string functionName, string queryString, HttpStatusCode expectedStatusCode, string expectedMessage)
{
HttpResponseMessage response = await HttpHelpers.InvokeHttpTrigger(functionName, queryString);
using HttpResponseMessage response = await HttpHelpers.InvokeHttpTrigger(functionName, queryString);
string actualMessage = await response.Content.ReadAsStringAsync();

Assert.Equal(expectedStatusCode, response.StatusCode);
Expand Down

0 comments on commit d3f3328

Please sign in to comment.