File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed
src/Tests/Nest.Tests.Unit/Reproduce Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change 33using NUnit . Framework ;
44using System ;
55using System . Collections . Generic ;
6+ using System . IO ;
67using System . Linq ;
78using System . Reflection ;
89using System . Text ;
910using System . Threading . Tasks ;
11+ using Elasticsearch . Net . Connection ;
1012
1113namespace Nest . Tests . Unit . Reproduce
1214{
@@ -16,17 +18,24 @@ public class Reproduce1464Tests : BaseJsonTests
1618 [ Test ]
1719 public void Issue1464 ( )
1820 {
21+ var rawClient = new ElasticsearchClient ( connection : new InMemoryConnection ( new ConnectionSettings ( ) ) ) ;
22+
1923 var bulkEntries = new List < object > ( ) ;
2024 bulkEntries . Add ( new { index = new { _index = "ourIndex" , _type = "ourType" , _id = "ourId" } } ) ;
2125
22- var doc = JsonConvert . DeserializeObject < dynamic > ( "{ \" id\" : \" 3\" }" ) ;
26+ var doc = rawClient . Serializer . Deserialize < dynamic > ( new MemoryStream ( "{ \" id\" : \" 3\" }" . Utf8Bytes ( ) ) ) ;
2327 doc . someprop = "some value" ;
2428 bulkEntries . Add ( doc ) ;
2529
2630 var response = this . _client . Raw . Bulk ( bulkEntries ) ;
2731 var actual = response . Request . Utf8String ( ) ;
32+ this . BulkJsonEquals ( actual , MethodBase . GetCurrentMethod ( ) ) ;
2833
34+ response = rawClient . Bulk ( bulkEntries ) ;
35+ actual = response . Request . Utf8String ( ) ;
2936 this . BulkJsonEquals ( actual , MethodBase . GetCurrentMethod ( ) ) ;
37+
38+
3039 }
3140 }
3241}
You can’t perform that action at this time.
0 commit comments