Skip to content

Conversation

@russcam
Copy link
Contributor

@russcam russcam commented Jun 27, 2019

…-body

This commit returns default(T) when no bytes are read from the response stream. Move the stream null and seek check into JsonSerializer.

Update index exists integration test to not disable direct streaming in order to test.

…-body

This commit returns default(T) when no bytes are read from the response stream.
Move the stream null and seek check into JsonSerializer.

Update index exists integration test to not disable direct streaming in order to test.
@russcam russcam requested review from Mpdreamz and codebrain June 27, 2019 06:05

namespace Tests.Core.ManagedElasticsearch.Clusters
{
public class DirectStreamingReadOnlyCluster : ClientTestClusterBase
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems a bit heavy handed, can we just override in the test?

(Although I can see a counter argument here that we may want to keep around for other tests).

public static T Deserialize<T>(byte[] bytes, int offset, IJsonFormatterResolver resolver)
{
if (resolver == null) resolver = DefaultResolver;
if (bytes == null || bytes.Length == 0)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++

@Mpdreamz Mpdreamz merged commit 6ee869f into 7.x Jun 27, 2019
@Mpdreamz Mpdreamz deleted the fix/direct-streaming-no-response-body branch June 27, 2019 08:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants