Closed Smaug123 closed 9 months ago
The test failure is presumably a flaky test, given that it passed on macOS?
A total of 1 test files matched the specified pattern.
Failed FormatDocument("5.2.2") [3 s]
Error Message:
Assert.That(, )
Expected: 1
But was: 4
Stack Trace:
at Fantomas.Client.Tests.FormatDocument@93-1.MoveNext() in /home/runner/work/fantomas/fantomas/src/Fantomas.Client.Tests/EndToEndTests.fs:line 101
at Fantomas.Client.Tests.clo@29-2.MoveNext() in /home/runner/work/fantomas/fantomas/src/Fantomas.Client.Tests/EndToEndTests.fs:line 61
at NUnit.Framework.Internal.TaskAwaitAdapter.GenericAdapter`1.BlockUntilCompleted()
at NUnit.Framework.Internal.MessagePumpStrategy.NoMessagePumpStrategy.WaitForCompletion(AwaitAdapter awaiter)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await[TResult](Func`1 invoke)
at NUnit.Framework.Internal.AsyncToSyncAdapter.Await(Func`1 invoke)
at NUnit.Framework.Internal.Commands.TestMethodCommand.RunTestMethod(TestExecutionContext context)
at NUnit.Framework.Internal.Commands.TestMethodCommand.Execute(TestExecutionContext context)
at NUnit.Framework.Internal.Execution.SimpleWorkItem.<>c__DisplayClass3_0.<PerformWork>b__0()
at NUnit.Framework.Internal.ContextUtils.<>c__DisplayClass1_0`1.<DoIsolated>b__0(Object _)
1) at Fantomas.Client.Tests.FormatDocument@93-1.MoveNext() in /home/runner/work/fantomas/fantomas/src/Fantomas.Client.Tests/EndToEndTests.fs:line 101
at System.Runtime.CompilerServices.AsyncTaskMethodBuilder`1.AsyncStateMachineBox`1.ExecutionContextCallback(Object s)
The test failure is presumably a flaky test, given that it passed on macOS?
Yes, I've seen this fail before. Although very rarely.
I've run into this particular problem several times while using Myriad. This is user error (Fantomas does not define its behaviour if run on ASTs which are not the output of the F# compiler's parse phase), but this message would help the user track down what they've got wrong.
On
main
the assert appears to be optimised away: I just get the following stack trace.