Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SetupFakeDriver sometimes causes failure in the unit test. #3836

Closed
BDisp opened this issue Nov 19, 2024 · 3 comments · Fixed by #3879
Closed

SetupFakeDriver sometimes causes failure in the unit test. #3836

BDisp opened this issue Nov 19, 2024 · 3 comments · Fixed by #3879
Labels
bug testing Issues related to testing
Milestone

Comments

@BDisp
Copy link
Collaborator

BDisp commented Nov 19, 2024

          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)

@BDisp
Copy link
Collaborator Author

BDisp commented Nov 19, 2024

Another failure in https://github.com/gui-cs/Terminal.Gui/actions/runs/11921947611/job/33227171381. Don't know if it's related.

  Failed Terminal.Gui.ViewTests.NeedsDrawTests.NeedsDraw_False_After_SetRelativeLayout_10x10 [< 1 ms]
  Error Message:
   Assert.True() Failure
Expected: True
Actual:   False
  Stack Trace:
     at Terminal.Gui.ViewTests.NeedsDrawTests.NeedsDraw_False_After_SetRelativeLayout_10x10() in /home/runner/work/Terminal.Gui/Terminal.Gui/UnitTests/View/Draw/NeedsDisplayTests.cs:line 188
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.MethodBaseInvoker.InvokeWithNoArgs(Object obj, BindingFlags invokeAttr)

@tig tig added bug testing Issues related to testing labels Nov 19, 2024
@tig tig added this to the V2 Alpha milestone Nov 19, 2024
@BDisp
Copy link
Collaborator Author

BDisp commented Nov 19, 2024

Thanks for the labels. I forgot 😃

@BDisp
Copy link
Collaborator Author

BDisp commented Dec 3, 2024

Reopening this because there is still a bug in the SetupFakeDriver.

@BDisp BDisp reopened this Dec 3, 2024
@tig tig closed this as completed in #3879 Dec 5, 2024
@tig tig closed this as completed in ce17fdd Dec 5, 2024
tig added a commit that referenced this issue Dec 5, 2024
Fixes #3836. SetupFakeDriver sometimes causes failure in the unit test.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug testing Issues related to testing
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants