Skip to content

InputDateInteractsWithEditContext_NonNullableDateTime test flakiness #31734

Description

@captainsafia

Error message

OpenQA.Selenium.BrowserAssertFailedException : Xunit.Sdk.EqualException: Assert.Equal() Failure
Expected: modified valid
Actual:   modified invalid
   at Xunit.Assert.Equal[T](T expected, T actual, IEqualityComparer1 comparer) in C:\\Dev\\xunit\\xunit\\src\\xunit.assert\\Asserts\\EqualityAsserts.cs:line 40
 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass17_0.<WaitAssertCore>b__0() in /_/src/Shared/E2ETesting/WaitAssert.cs:line 83
 at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass18_01.<WaitAssertCore>b__0(IWebDriver ) in //src/Shared/E2ETesting/WaitAssert.cs:line 109
Screen shot captured at 'D:\workspace\_work\1\s\artifacts\TestResults\Release\Microsoft.AspNetCore.Components.E2ETests\bf12e230a077482c93a44465ccda36f2.png'
Encountered browser errors
[2021-04-12T17:01:25Z] [Info] http://127.0.0.1:53621/subdir/_framework/blazor.server.js 0:31687 "[2021-04-12T17:01:25.992Z] Information: Normalizing '_blazor' to 'http://127.0.0.1:53621/subdir/_blazor'."
[2021-04-12T17:01:25Z] [Info] http://127.0.0.1:53621/subdir 45:16 "Blazor server-side"
[2021-04-12T17:01:26Z] [Info] http://127.0.0.1:53621/subdir/_framework/blazor.server.js 0:31687 "[2021-04-12T17:01:25.998Z] Information: WebSocket connected to ws://127.0.0.1:53621/subdir/_blazor?id=foJb3ozHB7bXxtdKAJ8Kbg."
[2021-04-12T17:01:27Z] [Info] http://127.0.0.1:53621/subdir/_framework/blazor.server.js 0:31687 "[2021-04-12T17:01:27.398Z] Information: Normalizing '_blazor' to 'http://127.0.0.1:53621/subdir/_blazor'."
[2021-04-12T17:01:27Z] [Info] http://127.0.0.1:53621/subdir 45:16 "Blazor server-side"
[2021-04-12T17:01:27Z] [Info] http://127.0.0.1:53621/subdir/_framework/blazor.server.js 0:31687 "[2021-04-12T17:01:27.408Z] Information: WebSocket connected to ws://127.0.0.1:53621/subdir/_blazor?id=n_74YY7aNbRQ53NAUSdGuQ."Page content:
<head>
    <meta charset="utf-8">
    <title>Basic test app</title>
    <base href="/subdir/">
    <link href="style.css" rel="stylesheet">
    <link rel="icon" href="data:,">

    
    <link href="_content/TestContentPackage/styles.css" rel="stylesheet">
    <link href="Components.TestServer.styles.css" rel="stylesheet">
</head>
<body>
    <root><div id="test-selector">
    Select test:
    <select id="test-selector-select"><option value="none">Choose...
        <option value="BasicTestApp.AfterRenderInteropComponent">After-render interop component
        <option value="BasicTestApp.AuthTest.AuthRouter">Auth cases
        <option value="BasicTestApp.BindCasesComponent">bind cases
        <option value="BasicTestApp.ComponentRefComponent">Component ref component
        <option value="BasicTestApp.ConfigurationComponent">Con

Stacktrace

   at Microsoft.AspNetCore.E2ETesting.WaitAssert.WaitAssertCore[TResult](IWebDriver driver, Func`1 assertion, TimeSpan timeout) in /_/src/Shared/E2ETesting/WaitAssert.cs:line 129
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.WaitAssertCore(IWebDriver driver, Action assertion, TimeSpan timeout) in /_/src/Shared/E2ETesting/WaitAssert.cs:line 84
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.Equal[T](IWebDriver driver, T expected, Func`1 actual) in /_/src/Shared/E2ETesting/WaitAssert.cs:line 27
   at Microsoft.AspNetCore.Components.E2ETest.Tests.FormsTest.InputDateInteractsWithEditContext_NonNullableDateTime() in /_/src/Components/test/E2ETest/Tests/FormsTest.cs:line 211
----- Inner Stack Trace -----
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass17_0.<WaitAssertCore>b__0() in /_/src/Shared/E2ETesting/WaitAssert.cs:line 83
   at Microsoft.AspNetCore.E2ETesting.WaitAssert.<>c__DisplayClass18_0`1.<WaitAssertCore>b__0(IWebDriver _) in /_/src/Shared/E2ETesting/WaitAssert.cs:line 109

Activity

  1. SteveSandersonMS commented on May 20, 2021

    @SteveSandersonMS
    Member

    This test has passed every time since the start of April except:

    • 4 builds all on April 29th where Selenium as a whole wasn't working, so I'm not counting those as failures against this test in particular.
    • 1 build on April 24th when 78 other tests also failed, seemingly as a result of a refactoring that broke a lot of stuff all at once. Again that doesn't count as flakiness for this test.

    Based on this, I don't have any reason to believe there's anything distinctively flaky about this test.

    I don't think we should be expecting 100% consistency for E2E tests under the current implementation and CI conditions. Or if that is our goal, looking at the tests individually is not likely the way to get there.

    @HaoK What's the latest on auto-unquarantining? Is that still happening, or should I manually unquarantine this?

  2. HaoK commented on May 20, 2021

    @HaoK
    Member

    What's the latest on auto-unquarantining? Is that still happening, or should I manually unquarantine this?

    There are some upcoming tweaks to the process(applying a new 'test fixed' label), but when we notice that a test has been behaving well like in this case, we should go ahead and unquarantine manually for now.

  3. removed their assignment
    on May 26, 2021
  4. 11 remaining items

  5. rokonec commented on Jul 28, 2026

    @rokonec
    Member

    I am not sure how it currently behaves, but back then it was only 8 and 9 branches.

  6. ilonatommy commented on Jul 28, 2026

    @ilonatommy
    Member

    It's net8 net9 issue. The test is blocked on these branches:

    [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/31734")]

    [QuarantinedTest("https://github.com/dotnet/aspnetcore/issues/31734")]

    Adjusting milestone. There's no visible change in the test itself between net8/9 and main. The only change in the test was GetAttribute -> GetDomAttribute.

  7. modified the milestones: 11.0-rc1, 8.0.x on Jul 28, 2026
  8. ilonatommy commented on Jul 30, 2026

    @ilonatommy
    Member

    After looking into the flaky failures across the branches I think the most probable cause is that the test tries to emit SendKeys into the date input without positioning the caret first. The date is segmented (day/month/year) and focusing it doesn't reliably place the caret on the left-most segment e.g. local reproduction always lands the test's caret on year, so 01012000 input produces 12000-07-29 (month and day are the default values from today's date, we wrote only to the year). I would first try to fix the local, deterministic failure and backport it to previous releases. We can do that by adding explicit positioning steps, using arrows.

  9. Youssef1313 commented on Jul 30, 2026

    @Youssef1313
    Member

    @ilonatommy Given .NET 8 and .NET 9 are going out of support on 10th November 2026, and given that this is a test-only issue. Do we even care about spending time fixing a test-only issue?

  10. ilonatommy commented on Jul 30, 2026

    @ilonatommy
    Member

    It's failing locally deterministically (even main branch). I want to fix that aspect.

  11. unlocked this conversation on Jul 30, 2026
  12. added theissue type on Sep 2, 2026
  13. Youssef1313 commented on Sep 2, 2026

    @Youssef1313
    Member

    @ilonatommy Should this be closed now that #68125 and #68126 are merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions