Skip to content

Commit 957ced5

Browse files
committed
Adding back orderBy to some Optic tests
These were removed as part of MLE-805 (formerly bug 60065) when these tests started failing on 11-nightly due to the orderBy. I added orderBy back and ran them on 11.1.0, 11-nightly, and 12-nightly, and they all passed.
1 parent 3b71547 commit 957ced5

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnCtsQuery.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ public void testNearQueryFromLexicons() throws KeyManagementException, NoSuchAlg
310310
ModifyPlan plan2 = p.fromLexicons(index2, "myTeam", p.fragmentIdCol("fragId2"));
311311

312312
ModifyPlan output = plan1.joinInner(plan2)
313-
.where(p.eq(p.viewCol("myCity", "city"), p.col("cityName")));
313+
.where(p.eq(p.viewCol("myCity", "city"), p.col("cityName")))
314+
.orderBy(p.asc(p.col("date")));
314315

315316
JacksonHandle jacksonHandle = new JacksonHandle();
316317
jacksonHandle.setMimetype("application/json");
@@ -356,7 +357,8 @@ public void testCtsQueriesWithOptions()
356357

357358
ModifyPlan output = plan1.where(p.cts.jsonPropertyWordQuery("city", "*k", "wildcarded", "case-sensitive"))
358359
.joinInner(plan2)
359-
.where(p.eq(p.viewCol("myCity", "city"), p.col("cityName")));
360+
.where(p.eq(p.viewCol("myCity", "city"), p.col("cityName")))
361+
.orderBy(p.asc(p.col("date")));
360362

361363
JacksonHandle jacksonHandle = new JacksonHandle();
362364
jacksonHandle.setMimetype("application/json");

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnLexicons.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1206,8 +1206,6 @@ public void testRestrictedXPathPredicateMath() {
12061206
JacksonHandle jacksonHandle = new JacksonHandle();
12071207
jacksonHandle.setMimetype("application/json");
12081208

1209-
System.out.println("PLAN: " + plan.exportAs(ObjectNode.class).toPrettyString());
1210-
12111209
rowMgr.resultDoc(plan, jacksonHandle);
12121210
JsonNode rows = jacksonHandle.get().path("rows");
12131211
assertEquals(1, rows.size(), "Expected only the New Jersey row, which has a popularity of 2: " + rows.toPrettyString());

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnLiterals.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,8 @@ public void testJoinInnerDocOnJson()
625625
p.col("val"),
626626
p.col("uri"),
627627
p.as("nodes", p.xpath("doc", "/doc/distance/@direction")))
628-
.where(p.isDefined(p.col("nodes")));
628+
.where(p.isDefined(p.col("nodes")))
629+
.orderBy(p.asc("id"));
629630

630631
System.out.println(output17.exportAs(JsonNode.class).toPrettyString());
631632

@@ -653,7 +654,8 @@ public void testJoinInnerDocOnJson()
653654
p.col("val"),
654655
p.col("uri"),
655656
p.as("nodes", p.xpath("doc", "/doc/location/latLonPair/(lat|long)/text()")))
656-
.where(p.isDefined(p.col("nodes")));
657+
.where(p.isDefined(p.col("nodes")))
658+
.orderBy(p.asc("id"));
657659

658660
JacksonHandle jacksonHandle18 = new JacksonHandle();
659661
jacksonHandle18.setMimetype("application/json");
@@ -712,7 +714,8 @@ public void testJoinInnerDocOnJson()
712714
p.col("val"),
713715
p.col("uri"),
714716
p.as("nodes", p.xpath("doc", "/doc/city")))
715-
.where(p.isDefined(p.col("nodes")));
717+
.where(p.isDefined(p.col("nodes")))
718+
.orderBy(p.asc("id"));
716719
JacksonHandle jacksonHandle15 = new JacksonHandle();
717720
jacksonHandle15.setMimetype("application/json");
718721
rowMgr.resultDoc(output15, jacksonHandle15);

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/fastfunctest/TestOpticOnTriples.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,8 @@ public void testGroupByCountAndSum()
452452
ModifyPlan team_planSum = p.fromTriples(team_planSumSeq);
453453

454454
ModifyPlan outputSum = player_planSum.joinInner(team_planSum)
455-
.groupBy(null, p.sum(p.col("SumAll"), playerEffCol));
455+
.groupBy(null, p.sum(p.col("SumAll"), playerEffCol))
456+
.orderBy(p.desc(p.col("SumAll")));
456457
jacksonHandle = new JacksonHandle();
457458
jacksonHandle.setMimetype("application/json");
458459

0 commit comments

Comments
 (0)