Details
-
Bug
-
Resolution: Fixed
-
Major
-
3.0.0-alpha4
-
1
Description
It seems like on some platforms (at least Ubuntu16), the default ContractResolver for JsonConvert is the PascalCasePropertyNamesContractProvider DefaultContractResolver; this causes some tests to fail if they compare the JSON string:
Failed Couchbase.UnitTests.Services.Search.FtsDataMapperTests.Facets_Are_Populated_When_Result_Contains_Facets
Error Message:
Assert.Equal() Failure
↓ (pos 178)
Expected: ···{"numericRanges":[{"Name":"numeric1","Min":0.1,"Max":0.2,"Cou···
Actual: ···{"numericRanges":[{"name":"numeric1","min":0.1,"max":0.2,"cou···
↑ (pos 178)
Stack Trace:
at Couchbase.UnitTests.Services.Search.FtsDataMapperTests.Facets_Are_Populated_When_Result_Contains_Facets() in /home/couchbase/jenkins/workspace/dotnet/couchbase-net-client-scripted-build-pipeline/couchbase-net-client/tests/Couchbase.UnitTests/Services/Search/SearchDataMapperTests.cs:line 180
{"ctl":{"timeout":10000,"consistency":{"level":"at_plus","vectors":{}}},"size":10,"from":20,"explain":true}
{"ctl":{"timeout":10000,"consistency":{"level":"at_plus","vectors":{}}},"size":10,"from":20,"explain":true}
{"ctl":
,"facets":{"termfacet":
{"field":"thefield","size":10},"daterangefacet":{"field":"thefield","size":10,"date_ranges":[
{"name":null,"start":"2019-07-24T21:59:31.9295867+00:00","end":"2019-07-25T21:59:31.9295885+00:00"}]},"numericrangefacet":{"field":"thefield","size":2,"numeric_ranges":[
{"name":null,"min":2.2,"max":3.5}]}}}