Skip to content

Commit 9bc80a1

Browse files
committed
fixed 3 failing tests that caused the build to fail #657
1 parent bcfaed3 commit 9bc80a1

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

Diff for: build/build.fsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Target "BuildApp" (fun _ ->
4040

4141
//Scan for xml docs and patch them to replace <inheritdoc /> with the documentation
4242
//from their interfaces
43-
!! "build/output/Nest/Nest.xml" |> Seq.iter(fun f -> PatchXmlDoc f)
43+
//!! "build/output/Nest/Nest.xml" |> Seq.iter(fun f -> PatchXmlDoc f)
4444

4545
CopyFile "build/output/Elasticsearch.Net/init.ps1" "build/elasticsearch-init.ps1"
4646

Diff for: src/Elasticsearch.Net/Connection/Transport.cs

+7-1
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,13 @@ private ElasticsearchResponse<T> DoRequest<T>(TransportRequestState<T> requestSt
202202
&& requestState.RequestConfiguration != null
203203
&& requestState.RequestConfiguration.AllowedStatusCodes.All(i => i != streamResponse.HttpStatusCode)))
204204
{
205-
error = this.Serializer.Deserialize<ElasticsearchServerError>(streamResponse.Response);
205+
if (streamResponse.Response != null)
206+
error = this.Serializer.Deserialize<ElasticsearchServerError>(streamResponse.Response);
207+
else
208+
error = new ElasticsearchServerError
209+
{
210+
Status = streamResponse.HttpStatusCode.GetValueOrDefault(-1)
211+
};
206212
if (this.Settings.ThrowOnElasticsearchServerExceptions)
207213
throw new ElasticsearchServerException(error);
208214
}

Diff for: src/Tests/Nest.Tests.Unit/Nest.Tests.Unit.csproj

+3-1
Original file line numberDiff line numberDiff line change
@@ -323,7 +323,9 @@
323323
<None Include="Core\Map\Properties\AttachmentProperty.json">
324324
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
325325
</None>
326-
<None Include="Core\Map\Properties\DocValuesProperty.json" />
326+
<None Include="Core\Map\Properties\DocValuesProperty.json">
327+
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
328+
</None>
327329
<None Include="Core\Map\Properties\GeoShapeProperty.json">
328330
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
329331
</None>

0 commit comments

Comments
 (0)