Skip to content

SetupFakeDriver sometimes causes failure in the unit test. #3836

Closed
@BDisp

Description

@BDisp
          Yes, because sometimes it causes failure in the `With_Subview_Using_PosFunc` unit test. See https://github.com/gui-cs/Terminal.Gui/actions/runs/11903293490/job/33169963032. The reason is a racing condition where the `SetupFakeDriver` was resizing the terminal to (5,5) and when the above unit test is running the terminal size isn't what it's expected and corrupt the expected value.
  Failed Terminal.Gui.LayoutTests.DimAutoTests.With_Subview_Using_PosFunc [3 ms]
  Error Message:
   Assert.Equal() Failure: Values differ
Expected: 25
Actual:   20
  Stack Trace:
     at Terminal.Gui.LayoutTests.DimAutoTests.With_Subview_Using_PosFunc() in /home/runner/work/Terminal.Gui/Terminal.Gui/UnitTests/View/Layout/Dim.AutoTests.PosTypes.cs:line 647
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

Originally posted by @BDisp in #3828 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    testingIssues related to testing

    Type

    No type

    Projects

    Status

    ✅ Done

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions