Skip to content

Commit

Permalink
Use exactly representable float numbers for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
flobernd committed Jul 24, 2023
1 parent c145975 commit 55c6abd
Show file tree
Hide file tree
Showing 34 changed files with 1,052 additions and 110 deletions.
942 changes: 942 additions & 0 deletions src/Elastic.Clients.Elasticsearch.Serverless/packages.lock.json

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions tests/Tests.ClusterLauncher/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -2931,7 +2931,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
"Elastic.Transport": "[0.4.12, )"
"Elastic.Transport": "[0.4.14, )"
}
},
"elastic.clients.elasticsearch.jsonnetserializer": {
Expand All @@ -2944,15 +2944,15 @@
"tests.configuration": {
"type": "Project",
"dependencies": {
"Elastic.Elasticsearch.Managed": "[0.4.1, )"
"Elastic.Elasticsearch.Managed": "[0.4.3, )"
}
},
"tests.core": {
"type": "Project",
"dependencies": {
"DiffPlex": "[1.4.1, )",
"Elastic.Clients.Elasticsearch.JsonNetSerializer": "[8.0.0, )",
"Elastic.Elasticsearch.Xunit": "[0.4.1, )",
"Elastic.Elasticsearch.Xunit": "[0.4.3, )",
"FluentAssertions": "[5.10.3, )",
"JunitXml.TestLogger": "[3.0.110, )",
"Microsoft.Bcl.HashCode": "[1.1.1, )",
Expand All @@ -2969,7 +2969,7 @@
"dependencies": {
"Bogus": "[22.1.2, )",
"Elastic.Clients.Elasticsearch": "[8.0.0, )",
"Elastic.Elasticsearch.Managed": "[0.4.1, )",
"Elastic.Elasticsearch.Managed": "[0.4.3, )",
"Newtonsoft.Json": "[13.0.1, )",
"Tests.Configuration": "[8.0.0, )"
}
Expand Down Expand Up @@ -3068,45 +3068,45 @@
},
"Elastic.Elasticsearch.Ephemeral": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "zsqa3+N1gVMVr7YHMDRFh7dM0NfQDEIHFgVugbd9B4Bc6rApCM++c1MIAIeJoVgY9ohiaTxkjAyaTgwgyIZsrg==",
"resolved": "0.4.3",
"contentHash": "fmu7A6bm3sOTGrG+MAINRQ2Op0n6K1OjfNErNMhpTOt5mQ0UjX8zfpiZoM+nB0jA8bX1nt1YR++5YCnYGJFtRg==",
"dependencies": {
"Elastic.Elasticsearch.Managed": "0.4.1",
"Elastic.Elasticsearch.Managed": "0.4.3",
"SharpZipLib.NETStandard": "1.0.7"
}
},
"Elastic.Elasticsearch.Managed": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "/1vsS1lTGbjiEj+M3M7s4lcVLiWrYZk/pjrQgnANeZb/paAeLbwIlSRhbyCD2sJIavvKef30+zBtbuk7p+yDYA==",
"resolved": "0.4.3",
"contentHash": "B7FvSMeNqYM3Yl/r/QRyROuAkMSiSQ0EvZQ36Cqrxm6uRBodlwky4yy4Im/AnOIQIl5lFLGr4vLHwWedHPharw==",
"dependencies": {
"Elastic.Stack.ArtifactsApi": "0.4.1",
"Elastic.Stack.ArtifactsApi": "0.4.3",
"Proc": "0.6.1",
"System.Net.Http": "4.3.1"
}
},
"Elastic.Elasticsearch.Xunit": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "yROS79fuUbstKoGAVuhRE/x7EbLzCxCUV4Pcik8fXiqWupzfEAzSez+kxhKE2sRcvMN+UUKiqCwsMrjgY0hbIg==",
"resolved": "0.4.3",
"contentHash": "kKn9Fiihel643Rywvl1bH2luQdhuefMh7wVPaLViEj8olU5Ud0bb1nZ8AFhm4PnEbLjw5PZ49Pn5hvyoYnJesQ==",
"dependencies": {
"Elastic.Elasticsearch.Ephemeral": "0.4.1",
"Elastic.Elasticsearch.Ephemeral": "0.4.3",
"xunit": "2.4.1"
}
},
"Elastic.Stack.ArtifactsApi": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "8za3oTNW5VQAbQCadm9yb3HyB+U76oz/urdx3Sn0CIX4uW139iqVpm4mE+77tCCkbFp1ZVnrmSq/kBwT6Jgcaw==",
"resolved": "0.4.3",
"contentHash": "mqfBDj5s8Gj6QWNYmCNJo2raxbzn8fUBk+eSxA5HeDYjEXoK52kOBvFSy4bL9Qaz+EW6JvOvt8nw0cm5MorJUA==",
"dependencies": {
"SemanticVersioning": "0.8.0",
"System.Text.Json": "4.6.0"
}
},
"Elastic.Transport": {
"type": "Transitive",
"resolved": "0.4.12",
"contentHash": "Z4CWaO8CH23KMOAcUuevAeOHv9PWBBycWQxYXYgltHcKsEOityrxmGO4ytdIppVrGeBc4RaIclnjV8PKiHtWfQ==",
"resolved": "0.4.14",
"contentHash": "VjfChM++MnfljqKnCN75h2huIlg7HkUgrc4VyLh8HMyMKPxaK9LrxbUH8xeDm7bIqEd/qSCeujatfwhfYEhD6w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
Expand Down
12 changes: 6 additions & 6 deletions tests/Tests.Configuration/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
},
"Elastic.Elasticsearch.Managed": {
"type": "Direct",
"requested": "[0.4.1, )",
"resolved": "0.4.1",
"contentHash": "/1vsS1lTGbjiEj+M3M7s4lcVLiWrYZk/pjrQgnANeZb/paAeLbwIlSRhbyCD2sJIavvKef30+zBtbuk7p+yDYA==",
"requested": "[0.4.3, )",
"resolved": "0.4.3",
"contentHash": "B7FvSMeNqYM3Yl/r/QRyROuAkMSiSQ0EvZQ36Cqrxm6uRBodlwky4yy4Im/AnOIQIl5lFLGr4vLHwWedHPharw==",
"dependencies": {
"Elastic.Stack.ArtifactsApi": "0.4.1",
"Elastic.Stack.ArtifactsApi": "0.4.3",
"Proc": "0.6.1",
"System.Net.Http": "4.3.1"
}
Expand All @@ -36,8 +36,8 @@
},
"Elastic.Stack.ArtifactsApi": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "8za3oTNW5VQAbQCadm9yb3HyB+U76oz/urdx3Sn0CIX4uW139iqVpm4mE+77tCCkbFp1ZVnrmSq/kBwT6Jgcaw==",
"resolved": "0.4.3",
"contentHash": "mqfBDj5s8Gj6QWNYmCNJo2raxbzn8fUBk+eSxA5HeDYjEXoK52kOBvFSy4bL9Qaz+EW6JvOvt8nw0cm5MorJUA==",
"dependencies": {
"SemanticVersioning": "0.8.0",
"System.Text.Json": "4.6.0"
Expand Down
34 changes: 17 additions & 17 deletions tests/Tests.Core/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,11 @@
},
"Elastic.Elasticsearch.Xunit": {
"type": "Direct",
"requested": "[0.4.1, )",
"resolved": "0.4.1",
"contentHash": "yROS79fuUbstKoGAVuhRE/x7EbLzCxCUV4Pcik8fXiqWupzfEAzSez+kxhKE2sRcvMN+UUKiqCwsMrjgY0hbIg==",
"requested": "[0.4.3, )",
"resolved": "0.4.3",
"contentHash": "kKn9Fiihel643Rywvl1bH2luQdhuefMh7wVPaLViEj8olU5Ud0bb1nZ8AFhm4PnEbLjw5PZ49Pn5hvyoYnJesQ==",
"dependencies": {
"Elastic.Elasticsearch.Ephemeral": "0.4.1",
"Elastic.Elasticsearch.Ephemeral": "0.4.3",
"xunit": "2.4.1"
}
},
Expand Down Expand Up @@ -128,36 +128,36 @@
},
"Elastic.Elasticsearch.Ephemeral": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "zsqa3+N1gVMVr7YHMDRFh7dM0NfQDEIHFgVugbd9B4Bc6rApCM++c1MIAIeJoVgY9ohiaTxkjAyaTgwgyIZsrg==",
"resolved": "0.4.3",
"contentHash": "fmu7A6bm3sOTGrG+MAINRQ2Op0n6K1OjfNErNMhpTOt5mQ0UjX8zfpiZoM+nB0jA8bX1nt1YR++5YCnYGJFtRg==",
"dependencies": {
"Elastic.Elasticsearch.Managed": "0.4.1",
"Elastic.Elasticsearch.Managed": "0.4.3",
"SharpZipLib.NETStandard": "1.0.7"
}
},
"Elastic.Elasticsearch.Managed": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "/1vsS1lTGbjiEj+M3M7s4lcVLiWrYZk/pjrQgnANeZb/paAeLbwIlSRhbyCD2sJIavvKef30+zBtbuk7p+yDYA==",
"resolved": "0.4.3",
"contentHash": "B7FvSMeNqYM3Yl/r/QRyROuAkMSiSQ0EvZQ36Cqrxm6uRBodlwky4yy4Im/AnOIQIl5lFLGr4vLHwWedHPharw==",
"dependencies": {
"Elastic.Stack.ArtifactsApi": "0.4.1",
"Elastic.Stack.ArtifactsApi": "0.4.3",
"Proc": "0.6.1",
"System.Net.Http": "4.3.1"
}
},
"Elastic.Stack.ArtifactsApi": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "8za3oTNW5VQAbQCadm9yb3HyB+U76oz/urdx3Sn0CIX4uW139iqVpm4mE+77tCCkbFp1ZVnrmSq/kBwT6Jgcaw==",
"resolved": "0.4.3",
"contentHash": "mqfBDj5s8Gj6QWNYmCNJo2raxbzn8fUBk+eSxA5HeDYjEXoK52kOBvFSy4bL9Qaz+EW6JvOvt8nw0cm5MorJUA==",
"dependencies": {
"SemanticVersioning": "0.8.0",
"System.Text.Json": "4.6.0"
}
},
"Elastic.Transport": {
"type": "Transitive",
"resolved": "0.4.12",
"contentHash": "Z4CWaO8CH23KMOAcUuevAeOHv9PWBBycWQxYXYgltHcKsEOityrxmGO4ytdIppVrGeBc4RaIclnjV8PKiHtWfQ==",
"resolved": "0.4.14",
"contentHash": "VjfChM++MnfljqKnCN75h2huIlg7HkUgrc4VyLh8HMyMKPxaK9LrxbUH8xeDm7bIqEd/qSCeujatfwhfYEhD6w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
Expand Down Expand Up @@ -689,7 +689,7 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
"Elastic.Transport": "[0.4.12, )"
"Elastic.Transport": "[0.4.14, )"
}
},
"elastic.clients.elasticsearch.jsonnetserializer": {
Expand All @@ -702,15 +702,15 @@
"tests.configuration": {
"type": "Project",
"dependencies": {
"Elastic.Elasticsearch.Managed": "[0.4.1, )"
"Elastic.Elasticsearch.Managed": "[0.4.3, )"
}
},
"tests.domain": {
"type": "Project",
"dependencies": {
"Bogus": "[22.1.2, )",
"Elastic.Clients.Elasticsearch": "[8.0.0, )",
"Elastic.Elasticsearch.Managed": "[0.4.1, )",
"Elastic.Elasticsearch.Managed": "[0.4.3, )",
"Newtonsoft.Json": "[13.0.1, )",
"Tests.Configuration": "[8.0.0, )"
}
Expand Down
20 changes: 10 additions & 10 deletions tests/Tests.Domain/packages.lock.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@
},
"Elastic.Elasticsearch.Managed": {
"type": "Direct",
"requested": "[0.4.1, )",
"resolved": "0.4.1",
"contentHash": "/1vsS1lTGbjiEj+M3M7s4lcVLiWrYZk/pjrQgnANeZb/paAeLbwIlSRhbyCD2sJIavvKef30+zBtbuk7p+yDYA==",
"requested": "[0.4.3, )",
"resolved": "0.4.3",
"contentHash": "B7FvSMeNqYM3Yl/r/QRyROuAkMSiSQ0EvZQ36Cqrxm6uRBodlwky4yy4Im/AnOIQIl5lFLGr4vLHwWedHPharw==",
"dependencies": {
"Elastic.Stack.ArtifactsApi": "0.4.1",
"Elastic.Stack.ArtifactsApi": "0.4.3",
"Proc": "0.6.1",
"System.Net.Http": "4.3.1"
}
Expand All @@ -48,17 +48,17 @@
},
"Elastic.Stack.ArtifactsApi": {
"type": "Transitive",
"resolved": "0.4.1",
"contentHash": "8za3oTNW5VQAbQCadm9yb3HyB+U76oz/urdx3Sn0CIX4uW139iqVpm4mE+77tCCkbFp1ZVnrmSq/kBwT6Jgcaw==",
"resolved": "0.4.3",
"contentHash": "mqfBDj5s8Gj6QWNYmCNJo2raxbzn8fUBk+eSxA5HeDYjEXoK52kOBvFSy4bL9Qaz+EW6JvOvt8nw0cm5MorJUA==",
"dependencies": {
"SemanticVersioning": "0.8.0",
"System.Text.Json": "4.6.0"
}
},
"Elastic.Transport": {
"type": "Transitive",
"resolved": "0.4.12",
"contentHash": "Z4CWaO8CH23KMOAcUuevAeOHv9PWBBycWQxYXYgltHcKsEOityrxmGO4ytdIppVrGeBc4RaIclnjV8PKiHtWfQ==",
"resolved": "0.4.14",
"contentHash": "VjfChM++MnfljqKnCN75h2huIlg7HkUgrc4VyLh8HMyMKPxaK9LrxbUH8xeDm7bIqEd/qSCeujatfwhfYEhD6w==",
"dependencies": {
"Microsoft.CSharp": "4.7.0",
"System.Buffers": "4.5.1",
Expand Down Expand Up @@ -251,13 +251,13 @@
"elastic.clients.elasticsearch": {
"type": "Project",
"dependencies": {
"Elastic.Transport": "[0.4.12, )"
"Elastic.Transport": "[0.4.14, )"
}
},
"tests.configuration": {
"type": "Project",
"dependencies": {
"Elastic.Elasticsearch.Managed": "[0.4.1, )"
"Elastic.Elasticsearch.Managed": "[0.4.3, )"
}
}
},
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/QueryDsl/Compound/FunctionScoreQueryUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ private static FunctionScore GetScriptScoreFunction()
protected override Query QueryInitializer => new FunctionScoreQuery
{
QueryName = "named_query",
Boost = 1.1f,
Boost = 1.25f,
Query = new MatchAllQuery(),
BoostMode = FunctionBoostMode.Multiply,
ScoreMode = FunctionScoreMode.Sum,
Expand All @@ -71,7 +71,7 @@ private static FunctionScore GetScriptScoreFunction()
queryDescriptor
.FunctionScore(c => c
.QueryName("named_query")
.Boost(1.1f)
.Boost(1.25f)
.Query(qq => qq.MatchAll())
.BoostMode(FunctionBoostMode.Multiply)
.ScoreMode(FunctionScoreMode.Sum)
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/QueryDsl/Geo/GeoBoundingBoxQueryUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class GeoBoundingBoxQueryUsageTests : QueryDslUsageTestsBase

protected override Query QueryInitializer => new GeoBoundingBoxQuery
{
Boost = 1.1f,
Boost = 1.25f,
QueryName = "named_query",
Field = Infer.Field<Project>(p => p.LocationPoint),
BoundingBox = new TopLeftBottomRightGeoBounds
Expand All @@ -29,7 +29,7 @@ public class GeoBoundingBoxQueryUsageTests : QueryDslUsageTestsBase

protected override QueryDescriptor<Project> QueryFluent(QueryDescriptor<Project> queryDescriptor) => queryDescriptor
.GeoBoundingBox(g => g
.Boost(1.1f)
.Boost(1.25f)
.QueryName("named_query")
.Field(p => p.LocationPoint)
.BoundingBox(new TopLeftBottomRightGeoBounds
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/QueryDsl/Geo/GeoDistanceQueryUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public GeoDistanceQueryUsageTests(ReadOnlyCluster cluster, EndpointUsage usage)

protected override Query QueryInitializer => new GeoDistanceQuery
{
Boost = 1.1f,
Boost = 1.25f,
QueryName = "named_query",
Field = Infer.Field<Project>(p => p.LocationPoint),
DistanceType = GeoDistanceType.Arc,
Expand All @@ -29,7 +29,7 @@ public GeoDistanceQueryUsageTests(ReadOnlyCluster cluster, EndpointUsage usage)
protected override QueryDescriptor<Project> QueryFluent(QueryDescriptor<Project> queryDescriptor) =>
queryDescriptor
.GeoDistance(g => g
.Boost(1.1f)
.Boost(1.25f)
.QueryName("named_query")
.Field(p => p.LocationPoint)
.DistanceType(GeoDistanceType.Arc)
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/QueryDsl/Geo/GeoPolygonQueryUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class GeoPolygonQueryUsageTests : QueryDslUsageTestsBase

protected override Query QueryInitializer => new GeoPolygonQuery
{
Boost = 1.1f,
Boost = 1.25f,
QueryName = "named_query",
ValidationMethod = GeoValidationMethod.Strict,
Polygon = new GeoPolygonPoints
Expand All @@ -34,7 +34,7 @@ public class GeoPolygonQueryUsageTests : QueryDslUsageTestsBase
protected override QueryDescriptor<Project> QueryFluent(QueryDescriptor<Project> queryDescriptor) => queryDescriptor
.GeoPolygon(c => c
.QueryName("named_query")
.Boost(1.1f)
.Boost(1.25f)
.Field(p => p.LocationPoint)
.ValidationMethod(GeoValidationMethod.Strict)
.Polygon(p => p.Points(new[]
Expand Down
4 changes: 2 additions & 2 deletions tests/Tests/QueryDsl/Specialized/PinnedQueryUsageTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ protected override Query QueryInitializer
var query = PinnedQuery.Ids(new Id[] { 1, 11, 22 });

query.QueryName = "named_query";
query.Boost = 1.1f;
query.Boost = 1.25f;
query.Organic = new MatchAllQuery { QueryName = "organic_query" };

return query;
Expand All @@ -35,7 +35,7 @@ protected override QueryDescriptor<Project> QueryFluent(QueryDescriptor<Project>
var query = PinnedQuery.Ids(new Id[] { 1, 11, 22 });

query.QueryName = "named_query";
query.Boost = 1.1f;
query.Boost = 1.25f;
query.Organic = new MatchAllQuery { QueryName = "organic_query" };

return queryDescriptor.Pinned(query);
Expand Down

0 comments on commit 55c6abd

Please sign in to comment.