diff --git a/benchmarks/Benchmarks/packages.lock.json b/benchmarks/Benchmarks/packages.lock.json index 7a4882942f1..f76b071c2b6 100644 --- a/benchmarks/Benchmarks/packages.lock.json +++ b/benchmarks/Benchmarks/packages.lock.json @@ -52,8 +52,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1129,7 +1129,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } } } diff --git a/benchmarks/Profiling/packages.lock.json b/benchmarks/Profiling/packages.lock.json index 2eb5f426ca6..9731f6b9512 100644 --- a/benchmarks/Profiling/packages.lock.json +++ b/benchmarks/Profiling/packages.lock.json @@ -16,8 +16,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -65,7 +65,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } } } diff --git a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json index d2abdde1f37..630e90ade93 100644 --- a/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch.JsonNetSerializer/packages.lock.json @@ -35,8 +35,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -148,7 +148,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } } }, @@ -192,8 +192,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -400,7 +400,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1", + "Elastic.Transport": "0.3.2", "System.Reflection.Emit": "4.3.0", "System.Reflection.Emit.Lightweight": "4.3.0" } diff --git a/src/Elastic.Clients.Elasticsearch/Common/ElasticsearchClientProductRegistration.cs b/src/Elastic.Clients.Elasticsearch/Common/ElasticsearchClientProductRegistration.cs index 2553c4638eb..8008c36bf01 100644 --- a/src/Elastic.Clients.Elasticsearch/Common/ElasticsearchClientProductRegistration.cs +++ b/src/Elastic.Clients.Elasticsearch/Common/ElasticsearchClientProductRegistration.cs @@ -15,7 +15,7 @@ public ElasticsearchClientProductRegistration(Type markerType) : base(markerType public static ElasticsearchClientProductRegistration DefaultForElasticsearchClientsElasticsearch { get; } = new(typeof(ElasticsearchClient)); /// - /// Elastic.Clients.Elasticsearch handles 404 in its , we do not want the low level client throwing + /// Elastic.Clients.Elasticsearch handles 404 in its , we do not want the low level client throwing /// exceptions /// when is enabled for 404's. The client is in charge of /// composing paths @@ -25,12 +25,12 @@ public override bool HttpStatusCodeClassifier(HttpMethod method, int statusCode) statusCode is >= 200 and < 300 or 404; /// - /// Makes the low level transport aware of Elastic.Clients.Elasticsearch's + /// Makes the low level transport aware of Elastic.Clients.Elasticsearch's /// so that it can peek in to its exposed error when reporting failures. /// public override bool TryGetServerErrorReason(TResponse response, out string? reason) { - if (response is not ResponseBase r) + if (response is not ElasticsearchResponseBase r) return base.TryGetServerErrorReason(response, out reason); reason = r.ServerError?.Error?.ToString(); return !string.IsNullOrEmpty(reason); diff --git a/src/Elastic.Clients.Elasticsearch/Common/Infer/Inferrer.cs b/src/Elastic.Clients.Elasticsearch/Common/Infer/Inferrer.cs index 5d6cfb3e531..e5657d2da24 100644 --- a/src/Elastic.Clients.Elasticsearch/Common/Infer/Inferrer.cs +++ b/src/Elastic.Clients.Elasticsearch/Common/Infer/Inferrer.cs @@ -39,7 +39,7 @@ public Inferrer(IElasticsearchClientSettings elasticsearchClientSettings) // Action>>>(); //CreateSearchResponseDelegates = // new ConcurrentDictionary>>(); + // Action>>(); } //internal ConcurrentDictionary>> @@ -47,7 +47,7 @@ public Inferrer(IElasticsearchClientSettings elasticsearchClientSettings) // CreateMultiHitDelegates { get; } //internal ConcurrentDictionary>> + // Action>> // CreateSearchResponseDelegates { get; } private FieldResolver FieldResolver { get; } diff --git a/src/Elastic.Clients.Elasticsearch/Common/Response/ExistsResponseBase.cs b/src/Elastic.Clients.Elasticsearch/Common/Response/ExistsResponseBase.cs index e4eaf344217..5a6a505c9d0 100644 --- a/src/Elastic.Clients.Elasticsearch/Common/Response/ExistsResponseBase.cs +++ b/src/Elastic.Clients.Elasticsearch/Common/Response/ExistsResponseBase.cs @@ -6,7 +6,7 @@ namespace Elastic.Clients.Elasticsearch { - public abstract class ExistsResponseBase : ResponseBase + public abstract class ExistsResponseBase : ElasticsearchResponseBase { public bool Exists => ApiCall is {Success: true, HttpStatusCode: 200}; } diff --git a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj index 3ed218dad4e..4cf6bbb67de 100644 --- a/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj +++ b/src/Elastic.Clients.Elasticsearch/Elastic.Clients.Elasticsearch.csproj @@ -17,7 +17,7 @@ annotations - + diff --git a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs index f34a72f580a..7536757a864 100644 --- a/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs +++ b/src/Elastic.Clients.Elasticsearch/Helpers/BulkAllObservable.cs @@ -238,7 +238,7 @@ private async Task RetryDocuments(long page, int backOffRetries return await BulkAsync(retryDocuments, page, backOffRetries).ConfigureAwait(false); } - private Exception ThrowOnBadBulk(IResponse response, string message) + private Exception ThrowOnBadBulk(IElasticsearchResponse response, string message) { _incrementFailed(); _partitionedBulkRequest.BackPressure?.Release(); diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs index 8d5d13d97c4..903f9dc2053 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/AsyncSearchStatusResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.AsyncSearch { - public partial class AsyncSearchStatusResponse : ResponseBase + public partial class AsyncSearchStatusResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("completion_status")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs index 1f9fd3d692b..b9e323e02ba 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/AsyncSearch/DeleteAsyncSearchResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.AsyncSearch { - public partial class DeleteAsyncSearchResponse : ResponseBase + public partial class DeleteAsyncSearchResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("acknowledged")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs index 2b5c1f4f39d..25aa79d3bdb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/BulkResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class BulkResponse : ResponseBase + public partial class BulkResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("errors")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs index 740ffd851ed..32f491fa531 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/ClosePointInTimeResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class ClosePointInTimeResponse : ResponseBase + public partial class ClosePointInTimeResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("num_freed")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterAllocationExplainResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterAllocationExplainResponse.g.cs index b79e84cd6ce..68b1a3c0c12 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterAllocationExplainResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterAllocationExplainResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Cluster { - public partial class ClusterAllocationExplainResponse : ResponseBase + public partial class ClusterAllocationExplainResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("allocate_explanation")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs index b3b6c6ff864..6c183cc99b6 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterHealthResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Cluster { - public partial class ClusterHealthResponse : ResponseBase + public partial class ClusterHealthResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("active_primary_shards")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterPendingTasksResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterPendingTasksResponse.g.cs index 191f454b6a2..8dde79458bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterPendingTasksResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterPendingTasksResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Cluster { - public partial class ClusterPendingTasksResponse : ResponseBase + public partial class ClusterPendingTasksResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("tasks")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStateResponse.g.cs index 4478e728d2c..4e256b98c15 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Cluster/ClusterStateResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Cluster { - public partial class ClusterStateResponse : ResponseBase + public partial class ClusterStateResponse : ElasticsearchResponseBase { } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs index 8c9e86b2925..299ef31d431 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CountResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class CountResponse : ResponseBase + public partial class CountResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("count")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs index 9714628d282..46c3ff1e17d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/CreateResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class CreateResponse : ResponseBase + public partial class CreateResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("forced_refresh")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs index 2c5738f11dd..e240ff978f3 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/DeleteResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class DeleteResponse : ResponseBase + public partial class DeleteResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("forced_refresh")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/DeleteEqlResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/DeleteEqlResponse.g.cs index c0001072f0d..2c73ffdae82 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/DeleteEqlResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/DeleteEqlResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Eql { - public partial class DeleteEqlResponse : ResponseBase + public partial class DeleteEqlResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("acknowledged")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetStatusResponse.g.cs index 5d15921e42e..b193ad99d6e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Eql/EqlGetStatusResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Eql { - public partial class EqlGetStatusResponse : ResponseBase + public partial class EqlGetStatusResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("completion_status")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs index d9e6d49fe11..b996932ebca 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/GetResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class GetResponse : ResponseBase + public partial class GetResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("fields")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteResponse.g.cs index dee5eb01ace..570455b5329 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/DeleteResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.IndexManagement { - public partial class DeleteResponse : ResponseBase + public partial class DeleteResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("acknowledged")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshResponse.g.cs index 52e7a0219af..6ea5c009391 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexManagement/RefreshResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.IndexManagement { - public partial class RefreshResponse : ResponseBase + public partial class RefreshResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("_shards")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs index 1169817334f..9cf1bb8522e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/IndexResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class IndexResponse : ResponseBase + public partial class IndexResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("forced_refresh")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs index 3144de75dee..ee6d24ec749 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/OpenPointInTimeResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class OpenPointInTimeResponse : ResponseBase + public partial class OpenPointInTimeResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("id")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingResponse.g.cs index ce365b601e3..6c015587121 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/PingResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class PingResponse : ResponseBase + public partial class PingResponse : ElasticsearchResponseBase { } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs index 45c8727c5b2..5a3749368bb 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SearchResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class SearchResponse : ResponseBase + public partial class SearchResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("aggregations")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceResponse.g.cs index 80f6025f7de..053aeed3655 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/SourceResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class SourceResponse : ResponseBase + public partial class SourceResponse : ElasticsearchResponseBase { } } \ No newline at end of file diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlClearCursorResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlClearCursorResponse.g.cs index 6b7e8dd1cbb..c24d522791e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlClearCursorResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlClearCursorResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Sql { - public partial class SqlClearCursorResponse : ResponseBase + public partial class SqlClearCursorResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("succeeded")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlDeleteAsyncResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlDeleteAsyncResponse.g.cs index f206bd8afbd..be94067654e 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlDeleteAsyncResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlDeleteAsyncResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Sql { - public partial class SqlDeleteAsyncResponse : ResponseBase + public partial class SqlDeleteAsyncResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("acknowledged")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncResponse.g.cs index b1fe27f83b0..96e8f8f9113 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Sql { - public partial class SqlGetAsyncResponse : ResponseBase + public partial class SqlGetAsyncResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("columns")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncStatusResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncStatusResponse.g.cs index 0c4b8a6eb02..bd4afe6f2fc 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncStatusResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlGetAsyncStatusResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Sql { - public partial class SqlGetAsyncStatusResponse : ResponseBase + public partial class SqlGetAsyncStatusResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("completion_status")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlQueryResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlQueryResponse.g.cs index abc36f529ea..ffd24340899 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlQueryResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Sql/SqlQueryResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Sql { - public partial class SqlQueryResponse : ResponseBase + public partial class SqlQueryResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("columns")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksResponse.g.cs index 238c4a86b27..00f6fa852c5 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/GetTasksResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Tasks { - public partial class GetTasksResponse : ResponseBase + public partial class GetTasksResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("completed")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksCancelResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksCancelResponse.g.cs index 6a5fd679a38..b21b079f5cd 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksCancelResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksCancelResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Tasks { - public partial class TasksCancelResponse : ResponseBase + public partial class TasksCancelResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("node_failures")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksListResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksListResponse.g.cs index 9f68fa5cdb8..04e69e431ec 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksListResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/Tasks/TasksListResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Tasks { - public partial class TasksListResponse : ResponseBase + public partial class TasksListResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("node_failures")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs index 9c3ca507de1..2e6f8e6a038 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Api/UpdateResponse.g.cs @@ -22,7 +22,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch { - public partial class UpdateResponse : ResponseBase + public partial class UpdateResponse : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("forced_refresh")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearchResponseBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearchResponseBase.g.cs index 7d6d864ea1f..0e3b1e40f83 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearchResponseBase.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/AsyncSearch/AsyncSearchResponseBase.g.cs @@ -25,7 +25,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.AsyncSearch { - public abstract partial class AsyncSearchResponseBase : ResponseBase + public abstract partial class AsyncSearchResponseBase : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("expiration_time_in_millis")] diff --git a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlSearchResponseBase.g.cs b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlSearchResponseBase.g.cs index 6e5178af897..0a4da07ca9d 100644 --- a/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlSearchResponseBase.g.cs +++ b/src/Elastic.Clients.Elasticsearch/_Generated/Types/Eql/EqlSearchResponseBase.g.cs @@ -25,7 +25,7 @@ #nullable restore namespace Elastic.Clients.Elasticsearch.Eql { - public abstract partial class EqlSearchResponseBase : ResponseBase + public abstract partial class EqlSearchResponseBase : ElasticsearchResponseBase { [JsonInclude] [JsonPropertyName("hits")] diff --git a/src/Elastic.Clients.Elasticsearch/packages.lock.json b/src/Elastic.Clients.Elasticsearch/packages.lock.json index caab2f8dac8..64d049d21c1 100644 --- a/src/Elastic.Clients.Elasticsearch/packages.lock.json +++ b/src/Elastic.Clients.Elasticsearch/packages.lock.json @@ -10,9 +10,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.3.1, )", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "requested": "[0.3.2, )", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -99,9 +99,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.3.1, )", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "requested": "[0.3.2, )", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -239,9 +239,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.3.1, )", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "requested": "[0.3.2, )", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -482,9 +482,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.3.1, )", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "requested": "[0.3.2, )", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -605,9 +605,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.3.1, )", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "requested": "[0.3.2, )", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -688,9 +688,9 @@ }, "Elastic.Transport": { "type": "Direct", - "requested": "[0.3.1, )", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "requested": "[0.3.2, )", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", diff --git a/src/Playground/packages.lock.json b/src/Playground/packages.lock.json index 43bc7bf2212..93260dc167b 100644 --- a/src/Playground/packages.lock.json +++ b/src/Playground/packages.lock.json @@ -16,8 +16,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -65,7 +65,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.ClusterLauncher/packages.lock.json b/tests/Tests.ClusterLauncher/packages.lock.json index 1f762413b98..3d2e76feab3 100644 --- a/tests/Tests.ClusterLauncher/packages.lock.json +++ b/tests/Tests.ClusterLauncher/packages.lock.json @@ -60,8 +60,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1205,7 +1205,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -1307,8 +1307,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -2456,7 +2456,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "elastic.clients.elasticsearch.jsonnetserializer": { @@ -2558,8 +2558,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -3707,7 +3707,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.Core/Extensions/ShouldExtensions.cs b/tests/Tests.Core/Extensions/ShouldExtensions.cs index fc9bd82d18d..f052f553585 100644 --- a/tests/Tests.Core/Extensions/ShouldExtensions.cs +++ b/tests/Tests.Core/Extensions/ShouldExtensions.cs @@ -12,19 +12,19 @@ namespace Tests.Core.Extensions { public static class ShouldExtensions { - public static void ShouldHaveExpectedIsValid(this IResponse response, bool expectedIsValid) => + public static void ShouldHaveExpectedIsValid(this IElasticsearchResponse response, bool expectedIsValid) => response.IsValid.Should().Be(expectedIsValid, "{0}", response.DebugInformation); - public static void ShouldBeValid(this IResponse response) => + public static void ShouldBeValid(this IElasticsearchResponse response) => response.IsValid.Should().BeTrue("{0}", response.DebugInformation); - public static void ShouldBeValid(this IResponse response, string message) => + public static void ShouldBeValid(this IElasticsearchResponse response, string message) => response.IsValid.Should().BeTrue("{1} {0}", response.DebugInformation, message); - public static void ShouldNotBeValid(this IResponse response) => + public static void ShouldNotBeValid(this IElasticsearchResponse response) => response.IsValid.Should().BeFalse("{0}", response.DebugInformation); - public static void ShouldBeSuccess(this IResponse response) => + public static void ShouldBeSuccess(this IElasticsearchResponse response) => response.ApiCall.Success.Should().BeTrue("{0}", response.DebugInformation); diff --git a/tests/Tests.Core/Serialization/JsonRoundTripper.cs b/tests/Tests.Core/Serialization/JsonRoundTripper.cs index 6880638d131..1940ff05221 100644 --- a/tests/Tests.Core/Serialization/JsonRoundTripper.cs +++ b/tests/Tests.Core/Serialization/JsonRoundTripper.cs @@ -48,13 +48,13 @@ public T DeserializesTo(Action assert = null) return deserializationResult.Result; } - public void FromRequest(IResponse response) => ToSerializeTo(response.ApiCall.RequestBodyInBytes); + public void FromRequest(IElasticsearchResponse response) => ToSerializeTo(response.ApiCall.RequestBodyInBytes); - public void FromRequest(Func call) where T : IResponse => FromRequest(call(Tester.Client)); + public void FromRequest(Func call) where T : IElasticsearchResponse => FromRequest(call(Tester.Client)); - public void FromResponse(IResponse response) => ToSerializeTo(response.ApiCall.ResponseBodyInBytes); + public void FromResponse(IElasticsearchResponse response) => ToSerializeTo(response.ApiCall.ResponseBodyInBytes); - public void FromResponse(Func call) where T : IResponse => FromResponse(call(Tester.Client)); + public void FromResponse(Func call) where T : IElasticsearchResponse => FromResponse(call(Tester.Client)); private void ToSerializeTo(byte[] json) { diff --git a/tests/Tests.Core/packages.lock.json b/tests/Tests.Core/packages.lock.json index 3f7b87e1ed1..516cbb3a547 100644 --- a/tests/Tests.Core/packages.lock.json +++ b/tests/Tests.Core/packages.lock.json @@ -119,8 +119,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1515,7 +1515,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "elastic.clients.elasticsearch.jsonnetserializer": { diff --git a/tests/Tests.Domain/packages.lock.json b/tests/Tests.Domain/packages.lock.json index afa2799ce0c..234857270ba 100644 --- a/tests/Tests.Domain/packages.lock.json +++ b/tests/Tests.Domain/packages.lock.json @@ -42,8 +42,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1076,7 +1076,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "tests.configuration": { diff --git a/tests/Tests/Framework/EndpointTests/ApiIntegrationTestBase.cs b/tests/Tests/Framework/EndpointTests/ApiIntegrationTestBase.cs index 075e58cd8e4..73234257445 100644 --- a/tests/Tests/Framework/EndpointTests/ApiIntegrationTestBase.cs +++ b/tests/Tests/Framework/EndpointTests/ApiIntegrationTestBase.cs @@ -18,7 +18,7 @@ namespace Tests.Framework.EndpointTests public abstract class ApiIntegrationTestBase : ApiTestBase where TCluster : IEphemeralCluster, ITestCluster, new() - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { @@ -64,7 +64,7 @@ protected override Task AssertOnAllResponses(Action assert) => public abstract class NdJsonApiIntegrationTestBase : NdJsonApiTestBase where TCluster : IEphemeralCluster, ITestCluster, new() - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { @@ -111,10 +111,10 @@ protected override Task AssertOnAllResponses(Action assert) => public class ResponseAssertionException : Exception { - public ResponseAssertionException(Exception innerException, IResponse response) + public ResponseAssertionException(Exception innerException, IElasticsearchResponse response) : base(ResponseInMessage(innerException.Message, response), innerException) { } - private static string ResponseInMessage(string innerExceptionMessage, IResponse r) => $@"{innerExceptionMessage} + private static string ResponseInMessage(string innerExceptionMessage, IElasticsearchResponse r) => $@"{innerExceptionMessage} Response Under Test: {r.DebugInformation}"; } diff --git a/tests/Tests/Framework/EndpointTests/ApiTestBase.cs b/tests/Tests/Framework/EndpointTests/ApiTestBase.cs index 89c9c74b63d..1ea239911df 100644 --- a/tests/Tests/Framework/EndpointTests/ApiTestBase.cs +++ b/tests/Tests/Framework/EndpointTests/ApiTestBase.cs @@ -20,7 +20,7 @@ namespace Tests.Framework.EndpointTests public abstract class ApiTestBase : RequestResponseApiTestBase where TCluster : IEphemeralCluster, ITestCluster, new() - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { @@ -84,7 +84,7 @@ protected virtual void SerializesFluent() public abstract class NdJsonApiTestBase : RequestResponseApiTestBase where TCluster : IEphemeralCluster, ITestCluster, new() - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { diff --git a/tests/Tests/Framework/EndpointTests/CoordinatedIntegrationTestBase.cs b/tests/Tests/Framework/EndpointTests/CoordinatedIntegrationTestBase.cs index 19c12c5791d..f796bb1737e 100644 --- a/tests/Tests/Framework/EndpointTests/CoordinatedIntegrationTestBase.cs +++ b/tests/Tests/Framework/EndpointTests/CoordinatedIntegrationTestBase.cs @@ -26,7 +26,7 @@ public abstract class CoordinatedIntegrationTestBase protected CoordinatedIntegrationTestBase(CoordinatedUsage coordinatedUsage) => _coordinatedUsage = coordinatedUsage; protected async Task Assert(string name, Action assert) - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse { if (_coordinatedUsage.Skips(name)) return; @@ -39,7 +39,7 @@ protected async Task Assert(string name, Action assert) } protected async Task Assert(string name, Action assert) - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse { if (_coordinatedUsage.Skips(name)) return; @@ -59,7 +59,7 @@ protected async Task AssertRunsToCompletion(string name) } private async Task AssertOnAllResponses(string name, LazyResponses responses, Action assert) - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse { foreach (var (key, value) in await responses) { diff --git a/tests/Tests/Framework/EndpointTests/CoordinatedUsage.cs b/tests/Tests/Framework/EndpointTests/CoordinatedUsage.cs index b739acab302..51e17f8d6db 100644 --- a/tests/Tests/Framework/EndpointTests/CoordinatedUsage.cs +++ b/tests/Tests/Framework/EndpointTests/CoordinatedUsage.cs @@ -16,7 +16,7 @@ namespace Tests.Framework.EndpointTests { public class CoordinatedUsage : KeyedCollection { - public static readonly IResponse VoidResponse = new PingResponse(); + public static readonly IElasticsearchResponse VoidResponse = new PingResponse(); private readonly ITestCluster _cluster; @@ -85,7 +85,7 @@ public Func Calls( Action onResponse = null, Func uniqueValueSelector = null ) - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { @@ -112,13 +112,13 @@ public Func Call(Func return VoidResponse; }); - public Func Call(Func> call) where TResponse : IResponse + public Func Call(Func> call) where TResponse : IElasticsearchResponse { var client = Client; return k => Usage.CallOnce( () => new LazyResponses(k, async () => { - var dict = new Dictionary(); + var dict = new Dictionary(); foreach (var (m, v) in _values) { var response = await call(v, client); @@ -132,7 +132,7 @@ public Func Call(Func string.IsNullOrEmpty(Prefix) ? value : $"{Prefix}-{value}"; - private async ValueTask> CallAllClientMethodsOverloads( + private async ValueTask> CallAllClientMethodsOverloads( EndpointUsage usage, Func initializerBody, Func fluentBody, @@ -144,11 +144,11 @@ private async ValueTask> CallAllClientMethod Func uniqueValueSelector, ElasticsearchClient client ) - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { - var dict = new Dictionary(); + var dict = new Dictionary(); async Task InvokeApiCall( ClientMethod method, Func> invoke diff --git a/tests/Tests/Framework/EndpointTests/RequestResponseApiTestBase.cs b/tests/Tests/Framework/EndpointTests/RequestResponseApiTestBase.cs index 3330c9431c7..a8a55f43e65 100644 --- a/tests/Tests/Framework/EndpointTests/RequestResponseApiTestBase.cs +++ b/tests/Tests/Framework/EndpointTests/RequestResponseApiTestBase.cs @@ -21,7 +21,7 @@ namespace Tests.Framework.EndpointTests public abstract class RequestResponseApiTestBase : ExpectJsonTestBase, IClusterFixture, IClassFixture where TCluster : IEphemeralCluster, ITestCluster, new() - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse where TDescriptor : class where TInitializer : class { @@ -99,7 +99,7 @@ void IntegrateOnly(Action act) static (ClientMethod, Func>) Api(ClientMethod method, Func> action) => (method, action); - var dict = new Dictionary(); + var dict = new Dictionary(); var views = new[] { Api(ClientMethod.Initializer, () => new ValueTask(request(client, Initializer))), diff --git a/tests/Tests/Framework/EndpointTests/TestState/EndpointUsage.cs b/tests/Tests/Framework/EndpointTests/TestState/EndpointUsage.cs index 7fcaae04205..7ee666f3977 100644 --- a/tests/Tests/Framework/EndpointTests/TestState/EndpointUsage.cs +++ b/tests/Tests/Framework/EndpointTests/TestState/EndpointUsage.cs @@ -49,7 +49,7 @@ public LazyResponses CallOnce(Func clientUsage, string key) } public class SingleEndpointUsage : EndpointUsage - where TResponse : class, IResponse + where TResponse : class, IElasticsearchResponse { private readonly Func _fluent; private readonly Func> _fluentAsync; @@ -91,7 +91,7 @@ public void KickOffOnce(ElasticsearchClient client, bool oneRandomCall = false) var randomCall = Random.Number(0, 3); - var dict = new Dictionary(); + var dict = new Dictionary(); if (!oneRandomCall || randomCall == 0) Call(client, dict, ClientMethod.Fluent, v => _fluent(v, client)); @@ -115,7 +115,7 @@ public void KickOffOnce(ElasticsearchClient client, bool oneRandomCall = false) return dict; })); - private void Call(ElasticsearchClient client, IDictionary dict, ClientMethod method, Func call) + private void Call(ElasticsearchClient client, IDictionary dict, ClientMethod method, Func call) { CallUniqueValues.CurrentView = method; OnBeforeCall?.Invoke(client); @@ -123,7 +123,7 @@ private void Call(ElasticsearchClient client, IDictionary dict, ClientMethod method, + private async Task CallAsync(ElasticsearchClient client, IDictionary dict, ClientMethod method, Func> call ) { diff --git a/tests/Tests/Framework/EndpointTests/TestState/LazyResponses.cs b/tests/Tests/Framework/EndpointTests/TestState/LazyResponses.cs index ef00a5d8908..9f52df27d8b 100644 --- a/tests/Tests/Framework/EndpointTests/TestState/LazyResponses.cs +++ b/tests/Tests/Framework/EndpointTests/TestState/LazyResponses.cs @@ -9,17 +9,17 @@ namespace Tests.Framework.EndpointTests.TestState { - public class LazyResponses : AsyncLazy> + public class LazyResponses : AsyncLazy> { - public LazyResponses(Func> factory) : this("__ignored__", factory) {} + public LazyResponses(Func> factory) : this("__ignored__", factory) {} - public LazyResponses(Func>> factory) : this("__ignored__", factory) {} + public LazyResponses(Func>> factory) : this("__ignored__", factory) {} - public LazyResponses(string name, Func> factory) : base(factory) => Name = name; + public LazyResponses(string name, Func> factory) : base(factory) => Name = name; - public LazyResponses(string name, Func>> factory) : base(factory) => Name = name; + public LazyResponses(string name, Func>> factory) : base(factory) => Name = name; - public static LazyResponses Empty { get; } = new("__empty__", () => new Dictionary()); + public static LazyResponses Empty { get; } = new("__empty__", () => new Dictionary()); public string Name { get; } } diff --git a/tests/Tests/Framework/EndpointTests/UrlTester.cs b/tests/Tests/Framework/EndpointTests/UrlTester.cs index 8750585bdd3..54e6d1636b5 100644 --- a/tests/Tests/Framework/EndpointTests/UrlTester.cs +++ b/tests/Tests/Framework/EndpointTests/UrlTester.cs @@ -34,18 +34,18 @@ public static UrlTester ExpectUrl(HttpMethod method, string url, public static string EscapeUriString(string s) => Uri.EscapeDataString(s); - public UrlTester Fluent(Func call) where TResponse : IResponse => + public UrlTester Fluent(Func call) where TResponse : IElasticsearchResponse => WhenCalling(call, "fluent"); - public UrlTester Request(Func call) where TResponse : IResponse => + public UrlTester Request(Func call) where TResponse : IElasticsearchResponse => WhenCalling(call, "request"); public Task FluentAsync(Func> call) - where TResponse : IResponse => + where TResponse : IElasticsearchResponse => WhenCallingAsync(call, "fluent async"); public Task RequestAsync(Func> call) - where TResponse : IResponse => + where TResponse : IElasticsearchResponse => WhenCallingAsync(call, "request async"); //public UrlTester LowLevel(Func call) @@ -60,7 +60,7 @@ public Task RequestAsync(Func(Func call, string typeOfCall) - where TResponse : IResponse + where TResponse : IElasticsearchResponse { var callDetails = call(Client); return Assert(typeOfCall, callDetails.ApiCall); @@ -68,7 +68,7 @@ private UrlTester WhenCalling(Func ca internal async Task WhenCallingAsync(Func> call, string typeOfCall) - where TResponse : IResponse + where TResponse : IElasticsearchResponse { var callDetails = (await call(Client)).ApiCall; return Assert(typeOfCall, callDetails); diff --git a/tests/Tests/Framework/EndpointTests/UrlTesterExtensions.cs b/tests/Tests/Framework/EndpointTests/UrlTesterExtensions.cs index 34f26a084a2..ba3ed68d261 100644 --- a/tests/Tests/Framework/EndpointTests/UrlTesterExtensions.cs +++ b/tests/Tests/Framework/EndpointTests/UrlTesterExtensions.cs @@ -11,9 +11,9 @@ namespace Tests.Framework.EndpointTests public static class UrlTesterExtensions { public static async Task RequestAsync(this Task tester, Func> call) - where TResponse : IResponse => await (await tester).WhenCallingAsync(call, "request async"); + where TResponse : IElasticsearchResponse => await (await tester).WhenCallingAsync(call, "request async"); public static async Task FluentAsync(this Task tester, Func> call) - where TResponse : IResponse => await (await tester).WhenCallingAsync(call, "fluent async"); + where TResponse : IElasticsearchResponse => await (await tester).WhenCallingAsync(call, "fluent async"); } } diff --git a/tests/Tests/packages.lock.json b/tests/Tests/packages.lock.json index 37a51fb42c7..bfe75e68ecf 100644 --- a/tests/Tests/packages.lock.json +++ b/tests/Tests/packages.lock.json @@ -180,8 +180,8 @@ }, "Elastic.Transport": { "type": "Transitive", - "resolved": "0.3.1", - "contentHash": "zjY9FwRW77/jDctjIOZecuvRrGRuLg0IDMulT8jQr0ycsU4Ikde8uj5pUTkkkWyEmGRgjzf477QkeKGyq8AqVQ==", + "resolved": "0.3.2", + "contentHash": "saT+26tm2xsXEbCnZHP0bsQNUQbWrLQ2J9tlzAnxPHKsrnNbcuegNDTfZy8GJdrQNbg4tsnLerzThgkU8rYHbA==", "dependencies": { "Microsoft.CSharp": "4.7.0", "System.Buffers": "4.5.1", @@ -1440,7 +1440,7 @@ "elastic.clients.elasticsearch": { "type": "Project", "dependencies": { - "Elastic.Transport": "0.3.1" + "Elastic.Transport": "0.3.2" } }, "elastic.clients.elasticsearch.jsonnetserializer": {