You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The test data assumes a culture that can parse DateTimes in the format '1/19/7051'. This is not universally the case. If you are located somewhere that uses another format for dates, you will get an exception when running the test:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation.
---> System.FormatException: String '4/20/2847' was not recognized as a valid DateTime.
at System.DateTimeParse.Parse(ReadOnlySpan`1 s, DateTimeFormatInfo dtfi, DateTimeStyles styles)
at System.Convert.ToDateTime(String value)
at FileIO.WithAsyncStreams.<>c.<ProcessStreamAsync>b__1_1(String[] employeeLine) in C:\src\CSharpPerformanceBoosters\src\FileIO\WithAsyncStreams.cs:line 38
at System.Linq.Utilities.<>c__DisplayClass2_0`3.<CombineSelectors>b__0(TSource x)
at System.Linq.Enumerable.SelectListIterator`2.ToList()
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at FileIO.WithAsyncStreams.ProcessStreamAsync(String filePath) in C:\src\CSharpPerformanceBoosters\src\FileIO\WithAsyncStreams.cs:line 37
at FileIO.Benchmarks.FileIOTest.AsyncStream() in C:\src\CSharpPerformanceBoosters\tests\FileIO.Benchmarks\FileIOTest.cs:line 48
at BenchmarkDotNet.Autogenerated.Runnable_1.<.ctor>b__3_3() in C:\src\CSharpPerformanceBoosters\tests\FileIO.Benchmarks\bin\Release\net5.0\7ea90458-dc45-4102-9baf-2b1c22ea2ddc\7ea90458-dc45-4102-9baf-2b1c22ea2ddc.notcs:line 922
...
The text was updated successfully, but these errors were encountered:
JesHansen
added a commit
to JesHansen/CSharpPerformanceBoosters
that referenced
this issue
Jun 4, 2021
By specifying the invariant culture the tests are able to parse the
DateTimes correctly and run to completion, irregardless of how the
local systems Culture is configured.
The test data assumes a culture that can parse DateTimes in the format '1/19/7051'. This is not universally the case. If you are located somewhere that uses another format for dates, you will get an exception when running the test:
The text was updated successfully, but these errors were encountered: