File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
libs/x-content/src/test/java/org/elasticsearch/common/xcontent Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -376,7 +376,7 @@ public void testSubParserArray() throws IOException {
376376 builder .startArray ();
377377 int numberOfTokens = 0 ;
378378 for (int i = 0 ; i < numberOfArrayElements ; ++i ) {
379- numberOfTokens += generateRandomObjectForMarking (builder );
379+ numberOfTokens += generateRandomObject (builder , 0 );
380380 }
381381 builder .endArray ();
382382 builder .endObject ();
@@ -390,7 +390,7 @@ public void testSubParserArray() throws IOException {
390390 assertEquals (XContentParser .Token .START_ARRAY , parser .nextToken ()); // [
391391 XContentParser subParser = new XContentSubParser (parser );
392392 try {
393- int tokensToSkip = randomInt (numberOfTokens - 1 );
393+ int tokensToSkip = randomInt (numberOfTokens );
394394 for (int i = 0 ; i < tokensToSkip ; i ++) {
395395 // Simulate incomplete parsing
396396 assertNotNull (subParser .nextToken ());
You can’t perform that action at this time.
0 commit comments