Skip to content

Commit

Permalink
trying to fix the tests by increasing or decreasing the timeouts
Browse files Browse the repository at this point in the history
  • Loading branch information
adamsitnik committed Nov 23, 2023
1 parent 5bc076e commit 75c5eff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public async Task be_unhealthy_if_ravendb_is_available_but_timeout_is_too_low()
{
_.Urls = _urls;
_.Database = "Demo";
_.RequestTimeout = TimeSpan.Zero;
_.RequestTimeout = TimeSpan.FromMilliseconds(0.001);
}, tags: new string[] { "ravendb" });
})
.Configure(app =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,8 @@ public async Task be_unhealthy_if_sqlServer_is_not_available()

using var server = new TestServer(webHostBuilder);

using var response = await server.CreateRequest("/health").GetAsync();
using var cts = new CancellationTokenSource(TimeSpan.FromSeconds(30));
using var response = await server.CreateClient().SendAsync(new HttpRequestMessage(HttpMethod.Get, "/health"), cts.Token);

response.StatusCode.ShouldBe(HttpStatusCode.ServiceUnavailable);
}
Expand Down

0 comments on commit 75c5eff

Please sign in to comment.