Skip to content

Commit 5f0eb7f

Browse files
authored
[dotnet] Stabilize ShouldTimeoutIfAPageTakesTooLongToRefresh test (#16880)
1 parent c95abca commit 5f0eb7f

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

dotnet/test/common/PageLoadingTest.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -376,16 +376,14 @@ public void ShouldTimeoutIfAPageTakesTooLongToLoadAfterClick()
376376
public void ShouldTimeoutIfAPageTakesTooLongToRefresh()
377377
{
378378
// Get the sleeping servlet with a pause of 5 seconds
379-
long pageLoadTimeout = 2;
380-
long pageLoadTimeBuffer = 0;
381-
string slowLoadingPageUrl = EnvironmentManager.Instance.UrlBuilder.WhereIs("sleep?time=" + (pageLoadTimeout + pageLoadTimeBuffer));
379+
string slowLoadingPageUrl = EnvironmentManager.Instance.UrlBuilder.WhereIs("sleep?time=5");
382380
driver.Url = slowLoadingPageUrl;
383381

384382
driver.Manage().Timeouts().PageLoad = TimeSpan.FromSeconds(2);
385383

386384
try
387385
{
388-
AssertPageLoadTimeoutIsEnforced(() => driver.Navigate().Refresh(), 2, 4);
386+
AssertPageLoadTimeoutIsEnforced(driver.Navigate().Refresh, 2, 4);
389387
}
390388
finally
391389
{

0 commit comments

Comments
 (0)