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

Test failure: System.Data.Tests.AppDomainsAndFormatInfo.Bug55978 #24206

Closed
Cronan opened this issue Nov 21, 2017 · 9 comments · Fixed by dotnet/corefx#25482
Closed

Test failure: System.Data.Tests.AppDomainsAndFormatInfo.Bug55978 #24206

Cronan opened this issue Nov 21, 2017 · 9 comments · Fixed by dotnet/corefx#25482
Labels
area-System.Data test-bug Problem in test source code (most likely)
Milestone

Comments

@Cronan
Copy link
Contributor

Cronan commented Nov 21, 2017

The test System.Data.Tests.AppDomainsAndFormatInfo.Bug55978 has failed.

Stack trace:
System.Data.EvaluateException : Cannot perform '>=' operation on System.DateTime and System.String.
at System.Data.BinaryNode.SetTypeMismatchError(Int32 op, Type left, Type right) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 135
   at System.Data.BinaryNode.BinaryCompare(Object vLeft, Object vRight, StorageType resultType, Int32 op, CompareInfo comparer) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 267
   at System.Data.BinaryNode.BinaryCompare(Object vLeft, Object vRight, StorageType resultType, Int32 op) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 152
   at System.Data.BinaryNode.EvalBinaryOp(Int32 op, ExpressionNode left, ExpressionNode right, DataRow row, DataRowVersion version, Int32[] recordNos) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 871
   at System.Data.BinaryNode.Eval(DataRow row, DataRowVersion version) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 41
   at System.Data.BinaryNode.Eval(ExpressionNode expr, DataRow row, DataRowVersion version, Int32[] recordNos) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 142
   at System.Data.BinaryNode.EvalBinaryOp(Int32 op, ExpressionNode left, ExpressionNode right, DataRow row, DataRowVersion version, Int32[] recordNos) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 908
   at System.Data.BinaryNode.Eval(DataRow row, DataRowVersion version) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\BinaryNode.cs:line 41
   at System.Data.DataExpression.Invoke(DataRow row, DataRowVersion version) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Filter\DataExpression.cs:line 195
   at System.Data.Index.AcceptRecord(Int32 record, IFilter filter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Selection.cs:line 217
   at System.Data.Index.InitRecords(IFilter filter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Selection.cs:line 745
   at System.Data.Index..ctor(DataTable table, IndexField[] indexFields, Comparison`1 comparison, DataViewRowState recordStates, IFilter rowFilter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Selection.cs:line 138
   at System.Data.Index..ctor(DataTable table, IndexField[] indexFields, DataViewRowState recordStates, IFilter rowFilter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\Selection.cs:line 89
   at System.Data.DataTable.GetIndex(IndexField[] indexDesc, DataViewRowState recordStates, IFilter rowFilter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataTable.cs:line 3184
   at System.Data.DataTable.GetIndex(String sort, DataViewRowState recordStates, IFilter rowFilter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataTable.cs:line 3161
   at System.Data.DataView.UpdateIndex(Boolean force, Boolean fireEvent) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataView.cs:line 1557
   at System.Data.DataView.UpdateIndex(Boolean force) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataView.cs:line 1531
   at System.Data.DataView.SetIndex2(String newSort, DataViewRowState newRowStates, IFilter newRowFilter, Boolean fireEvent) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataView.cs:line 1508
   at System.Data.DataView.SetIndex(String newSort, DataViewRowState newRowStates, IFilter newRowFilter) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataView.cs:line 1486
   at System.Data.DataView.set_RowFilter(String value) in D:\git\dotnetfix\corefx\src\System.Data.Common\src\System\Data\DataView.cs:line 301
   at System.Data.Tests.AppDomainsAndFormatInfo.Bug55978() in D:\git\dotnetfix\corefx\src\System.Data.Common\tests\System\Data\DataTableTest.cs:line 4043
  • Config: netcoreapp-Windows_NT-Debug-x64
  • OS: Microsoft Windows [Version 6.1.7601]
@Cronan
Copy link
Contributor Author

Cronan commented Nov 21, 2017

Seems to pass if I change the RowFilter string from:
StartDate >= '{0}' and StartDate <= '{1}'
to
StartDate >= #{0}# and StartDate <= #{1}#

@Cronan
Copy link
Contributor Author

Cronan commented Nov 21, 2017

Perhaps related to the locale issue in #24147 ?

@danmoseley
Copy link
Member

@Cronan if you temporarily change your culture to en-US does it pass? Might be enough to just set the thread culture at the start of the test.

@Cronan
Copy link
Contributor Author

Cronan commented Nov 22, 2017

I’ll try that this morning

@Cronan
Copy link
Contributor Author

Cronan commented Nov 23, 2017

Quick question @danmosemsft , is changing the locale the right thing to do, unless the test targets a specific locale? Isn't it better to change the test so it doesn't require a specific locale to run?

@danmoseley
Copy link
Member

@Cronan yes probably that would be better.

@danmoseley
Copy link
Member

I just wanted to confirm it was a culture issue. Perhaps you'd like to offer that change as a PR?

@Cronan
Copy link
Contributor Author

Cronan commented Nov 24, 2017

I'll test both, and do a PR later today. I have 10 similar issues, but I'll probably deal with them one at a time, otherwise I lose track ...

@Cronan
Copy link
Contributor Author

Cronan commented Nov 24, 2017

Changing the locale worked, but I believe the change I've made will work in all more locales.

@msftgits msftgits transferred this issue from dotnet/corefx Jan 31, 2020
@msftgits msftgits added this to the 2.1.0 milestone Jan 31, 2020
@ghost ghost locked as resolved and limited conversation to collaborators Dec 19, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Data test-bug Problem in test source code (most likely)
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants