Skip to content

Commit a4f561f

Browse files
authored
Merge pull request #1683 from marklogic/feature/test-fixes
Fixes for nightly tests
2 parents 2fae24c + 24c6d86 commit a4f561f

File tree

3 files changed

+30
-31
lines changed

3 files changed

+30
-31
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2219,6 +2219,7 @@ public void testFromSqlUnionSelectOrderbyLimitOffset() {
22192219
jacksonHandle.setMimetype("application/json");
22202220

22212221
JsonNode result = rowManager.resultDoc(plan1, new JacksonHandle()).get();
2222+
assertNotNull(result, "result is unexpectedly null.");
22222223
JsonNode rows = result.path("rows");
22232224

22242225
assertEquals(2, rows.size());

marklogic-client-api/src/test/java/com/marklogic/client/test/PlanGeneratedTest.java

Lines changed: 27 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2024 MarkLogic Corporation
2+
* Copyright (c) 2023 MarkLogic Corporation
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -106,7 +106,7 @@ public void testFnAbs1Exec() {
106106

107107
@Test
108108
public void testFnAdjustDateTimeToTimezone1Exec() {
109-
executeTester("testFnAdjustDateTimeToTimezone1", p.fn.adjustDateTimeToTimezone(p.col("1")), true, "xs:dateTime", null, null, "2016-01-02T03:09:08-07:00", new ServerExpression[]{ p.xs.dateTime("2016-01-02T10:09:08Z") });
109+
executeTester("testFnAdjustDateTimeToTimezone1", p.fn.adjustDateTimeToTimezone(p.col("1")), true, "xs:dateTime", null, null, "2016-01-02T10:09:08Z", new ServerExpression[]{ p.xs.dateTime("2016-01-02T10:09:08Z") });
110110
}
111111

112112
@Test
@@ -116,7 +116,7 @@ public void testFnAdjustDateTimeToTimezone2Exec() {
116116

117117
@Test
118118
public void testFnAdjustDateToTimezone1Exec() {
119-
executeTester("testFnAdjustDateToTimezone1", p.fn.adjustDateToTimezone(p.col("1")), true, "xs:date", null, null, "2016-01-02-07:00", new ServerExpression[]{ p.xs.date("2016-01-02") });
119+
executeTester("testFnAdjustDateToTimezone1", p.fn.adjustDateToTimezone(p.col("1")), true, "xs:date", null, null, "2016-01-02Z", new ServerExpression[]{ p.xs.date("2016-01-02") });
120120
}
121121

122122
@Test
@@ -126,7 +126,7 @@ public void testFnAdjustDateToTimezone2Exec() {
126126

127127
@Test
128128
public void testFnAdjustTimeToTimezone1Exec() {
129-
executeTester("testFnAdjustTimeToTimezone1", p.fn.adjustTimeToTimezone(p.col("1")), true, "xs:time", null, null, "03:09:08-07:00", new ServerExpression[]{ p.xs.time("10:09:08Z") });
129+
executeTester("testFnAdjustTimeToTimezone1", p.fn.adjustTimeToTimezone(p.col("1")), true, "xs:time", null, null, "10:09:08Z", new ServerExpression[]{ p.xs.time("10:09:08Z") });
130130
}
131131

132132
@Test
@@ -211,17 +211,17 @@ public void testFnCount2Exec() {
211211

212212
@Test
213213
public void testFnCurrentDate0Exec() {
214-
executeTester("testFnCurrentDate0", p.fn.currentDate(), true, "xs:date", null, null, "2024-07-24-07:00", new ServerExpression[]{ });
214+
executeTester("testFnCurrentDate0", p.fn.currentDate(), true, "xs:date", null, null, "2023-10-24Z", new ServerExpression[]{ });
215215
}
216216

217217
@Test
218218
public void testFnCurrentDateTime0Exec() {
219-
executeTester("testFnCurrentDateTime0", p.fn.currentDateTime(), true, "xs:dateTime", null, null, "2024-07-24T12:52:41.506375-07:00", new ServerExpression[]{ });
219+
executeTester("testFnCurrentDateTime0", p.fn.currentDateTime(), true, "xs:dateTime", null, null, "2023-10-24T15:21:06.255777Z", new ServerExpression[]{ });
220220
}
221221

222222
@Test
223223
public void testFnCurrentTime0Exec() {
224-
executeTester("testFnCurrentTime0", p.fn.currentTime(), true, "xs:time", null, null, "12:52:41-07:00", new ServerExpression[]{ });
224+
executeTester("testFnCurrentTime0", p.fn.currentTime(), true, "xs:time", null, null, "15:21:06Z", new ServerExpression[]{ });
225225
}
226226

227227
@Test
@@ -332,7 +332,7 @@ public void testFnFormatTime2Exec() {
332332
@ExtendWith(RequiresML11OrLower.class)
333333
@Test
334334
public void testFnHead1Exec() {
335-
executeTester("testFnHead1", p.fn.head(p.col("1")), false, null, null, Format.JSON, null, new ServerExpression[]{ p.xs.stringSeq(p.xs.string("a"), p.xs.string("b"), p.xs.string("c")) });
335+
executeTester("testFnHead1", p.fn.head(p.col("1")), false, null, null, null, "a", new ServerExpression[]{ p.xs.stringSeq(p.xs.string("a"), p.xs.string("b"), p.xs.string("c")) });
336336
}
337337

338338
@Test
@@ -352,7 +352,7 @@ public void testFnHoursFromTime1Exec() {
352352

353353
@Test
354354
public void testFnImplicitTimezone0Exec() {
355-
executeTester("testFnImplicitTimezone0", p.fn.implicitTimezone(), true, "xs:dayTimeDuration", null, null, "-PT7H", new ServerExpression[]{ });
355+
executeTester("testFnImplicitTimezone0", p.fn.implicitTimezone(), true, "xs:dayTimeDuration", null, null, "PT0S", new ServerExpression[]{ });
356356
}
357357

358358
@Test
@@ -377,7 +377,7 @@ public void testFnIriToUri1Exec() {
377377

378378
@Test
379379
public void testFnLocalNameFromQName1Exec() {
380-
executeTester("testFnLocalNameFromQName1", p.fn.localNameFromQName(p.col("1")), false, null, null, null, "abc", new ServerExpression[]{ p.xs.QName("abc") });
380+
executeTester("testFnLocalNameFromQName1", p.fn.localNameFromQName(p.col("1")), false, "xs:NCName", null, null, "abc", new ServerExpression[]{ p.xs.QName("abc") });
381381
}
382382

383383
@Test
@@ -478,7 +478,7 @@ public void testFnNumber1Exec() {
478478
@ExtendWith(RequiresML11OrLower.class)
479479
@Test
480480
public void testFnPrefixFromQName1Exec() {
481-
executeTester("testFnPrefixFromQName1", p.fn.prefixFromQName(p.col("1")), false, null, null, null, "", new ServerExpression[]{ p.xs.QName("abc") });
481+
executeTester("testFnPrefixFromQName1", p.fn.prefixFromQName(p.col("1")), false, null, null, Format.JSON, null, new ServerExpression[]{ p.xs.QName("abc") });
482482
}
483483

484484
@Test
@@ -734,7 +734,7 @@ public void testGeoEllipsePolygon6Exec() {
734734
@Test
735735
@ExtendWith(RequiresML11.class)
736736
public void testGeoGeohashDecode1Exec() {
737-
executeTester("testGeoGeohashDecode1", p.geo.geohashDecode(p.col("1")), false, "cts:box", null, null, "[-90, -180, 90, 180]", new ServerExpression[]{ p.xs.string("abc") });
737+
executeTester("testGeoGeohashDecode1", p.geo.geohashDecode(p.col("1")), false, "cts:box", null, null, "[-90, -180, 90, 180]", new ServerExpression[]{p.xs.string("abc")});
738738
}
739739

740740
@Test
@@ -744,7 +744,7 @@ public void testGeoGeohashDecodePoint1Exec() {
744744

745745
@Test
746746
public void testGeoGeohashNeighbors1Exec() {
747-
executeTester("testGeoGeohashNeighbors1", p.geo.geohashNeighbors(p.col("1")), false, null, null, Format.JSON, "{\"NE\":\"s01mtz\", \"S\":\"s01mtt\", \"E\":\"s01mty\", \"W\":\"s01mtq\", \"SW\":\"s01mtm\", \"N\":\"s01mtx\", \"SE\":\"s01mtv\", \"NW\":\"s01mtr\"}", new ServerExpression[]{ p.xs.string("s01mtw") });
747+
executeTester("testGeoGeohashNeighbors1", p.geo.geohashNeighbors(p.col("1")), false, null, null, Format.JSON, "{\"NE\":\"s01mtz\", \"S\":\"s01mtt\", \"E\":\"s01mty\", \"W\":\"s01mtq\", \"N\":\"s01mtx\", \"SW\":\"s01mtm\", \"SE\":\"s01mtv\", \"NW\":\"s01mtr\"}", new ServerExpression[]{ p.xs.string("s01mtw") });
748748
}
749749

750750
@Test
@@ -1011,7 +1011,7 @@ public void testRdfLangStringLanguage1Exec() {
10111011

10121012
@Test
10131013
public void testSemBnode0Exec() {
1014-
executeTester("testSemBnode0", p.sem.bnode(), true, "sem:blank", null, null, "_:bnode8347318410939529127", new ServerExpression[]{ });
1014+
executeTester("testSemBnode0", p.sem.bnode(), true, "sem:blank", null, null, "_:bnode801272998575329659", new ServerExpression[]{ });
10151015
}
10161016

10171017
@Test
@@ -1046,7 +1046,7 @@ public void testSemInvalid2Exec() {
10461046

10471047
@Test
10481048
public void testSemIri1Exec() {
1049-
executeTester("testSemIri1", p.sem.iri(p.col("1")), false, "sem:iri", null, null, "http://a/b", new ServerExpression[]{ p.xs.string("http://a/b") });
1049+
executeTester("testSemIri1", p.sem.iri(p.col("1")), false, null, null, null, "http://a/b", new ServerExpression[]{ p.xs.string("http://a/b") });
10501050
}
10511051

10521052
@Test
@@ -1091,7 +1091,7 @@ public void testSemQNameToIri1Exec() {
10911091

10921092
@Test
10931093
public void testSemRandom0Exec() {
1094-
executeTester("testSemRandom0", p.sem.random(), true, null, null, null, "0.877559767806847", new ServerExpression[]{ });
1094+
executeTester("testSemRandom0", p.sem.random(), true, null, null, null, "0.996817928554708", new ServerExpression[]{ });
10951095
}
10961096

10971097
@Test
@@ -1116,12 +1116,12 @@ public void testSemUnknown2Exec() {
11161116

11171117
@Test
11181118
public void testSemUuid0Exec() {
1119-
executeTester("testSemUuid0", p.sem.uuid(), true, "sem:iri", null, null, "urn:uuid:7f6d7218-3a58-4315-ad88-ca0083d2183c", new ServerExpression[]{ });
1119+
executeTester("testSemUuid0", p.sem.uuid(), true, "sem:iri", null, null, "urn:uuid:c04549cf-e759-4190-bb96-8a0efaa4fcff", new ServerExpression[]{ });
11201120
}
11211121

11221122
@Test
11231123
public void testSemUuidString0Exec() {
1124-
executeTester("testSemUuidString0", p.sem.uuidString(), true, null, null, null, "8f364842-402f-4acf-bcc3-3148abf812c5", new ServerExpression[]{ });
1124+
executeTester("testSemUuidString0", p.sem.uuidString(), true, null, null, null, "32351923-7f22-4a3f-9e92-884151190ee8", new ServerExpression[]{ });
11251125
}
11261126

11271127
@Test
@@ -1256,7 +1256,7 @@ public void testSqlQuarter1Exec() {
12561256

12571257
@Test
12581258
public void testSqlRand1Exec() {
1259-
executeTester("testSqlRand1", p.sql.rand(p.col("1")), true, "xs:unsignedLong", null, null, "10013855825609952141", new ServerExpression[]{ p.xs.unsignedLong(1) });
1259+
executeTester("testSqlRand1", p.sql.rand(p.col("1")), true, "xs:unsignedLong", null, null, "1308547733197903283", new ServerExpression[]{ p.xs.unsignedLong(1) });
12601260
}
12611261

12621262
@Test
@@ -1361,7 +1361,7 @@ public void testXdmpCrypt2Exec() {
13611361

13621362
@Test
13631363
public void testXdmpCrypt21Exec() {
1364-
executeTester("testXdmpCrypt21", p.xdmp.crypt2(p.col("1")), true, null, null, null, "$256$UY3SnW6XAL..km7Iaiv/f1$256$fa8YOAkETMWtAaJf", new ServerExpression[]{ p.xs.string("abc") });
1364+
executeTester("testXdmpCrypt21", p.xdmp.crypt2(p.col("1")), true, null, null, null, "$256$Byph9.Mc3xqzhgeH.IAJh/$256$nAr3j1jWo/Wf2yN7", new ServerExpression[]{ p.xs.string("abc") });
13651365
}
13661366

13671367
@Test
@@ -1561,12 +1561,12 @@ public void testXdmpOr642Exec() {
15611561

15621562
@Test
15631563
public void testXdmpParseDateTime2Exec() {
1564-
executeTester("testXdmpParseDateTime2", p.xdmp.parseDateTime(p.col("1"), p.col("2")), true, "xs:dateTime", null, null, "2016-01-06T18:13:50.873-07:00", new ServerExpression[]{ p.xs.string("[Y0001]-[M01]-[D01]T[h01]:[m01]:[s01].[f1][Z]"), p.xs.string("2016-01-06T17:13:50.873594-08:00") });
1564+
executeTester("testXdmpParseDateTime2", p.xdmp.parseDateTime(p.col("1"), p.col("2")), true, "xs:dateTime", null, null, "2016-01-07T01:13:50.873Z", new ServerExpression[]{ p.xs.string("[Y0001]-[M01]-[D01]T[h01]:[m01]:[s01].[f1][Z]"), p.xs.string("2016-01-06T17:13:50.873594-08:00") });
15651565
}
15661566

15671567
@Test
15681568
public void testXdmpParseYymmdd2Exec() {
1569-
executeTester("testXdmpParseYymmdd2", p.xdmp.parseYymmdd(p.col("1"), p.col("2")), true, "xs:dateTime", null, null, "2016-01-06T18:13:50.873-07:00", new ServerExpression[]{ p.xs.string("yyyy-MM-ddThh:mm:ss.Sz"), p.xs.string("2016-01-06T17:13:50.873594-8.00") });
1569+
executeTester("testXdmpParseYymmdd2", p.xdmp.parseYymmdd(p.col("1"), p.col("2")), true, "xs:dateTime", null, null, "2016-01-07T01:13:50.873Z", new ServerExpression[]{ p.xs.string("yyyy-MM-ddThh:mm:ss.Sz"), p.xs.string("2016-01-06T17:13:50.873594-8.00") });
15701570
}
15711571

15721572
@Test
@@ -1591,12 +1591,12 @@ public void testXdmpQuarterFromDate1Exec() {
15911591

15921592
@Test
15931593
public void testXdmpRandom0Exec() {
1594-
executeTester("testXdmpRandom0", p.xdmp.random(), true, "xs:unsignedLong", null, null, "5081519083065291336", new ServerExpression[]{ });
1594+
executeTester("testXdmpRandom0", p.xdmp.random(), true, "xs:unsignedLong", null, null, "7692759001122562087", new ServerExpression[]{ });
15951595
}
15961596

15971597
@Test
15981598
public void testXdmpRandom1Exec() {
1599-
executeTester("testXdmpRandom1", p.xdmp.random(p.col("1")), true, null, null, null, "1", new ServerExpression[]{ p.xs.unsignedLong(1) });
1599+
executeTester("testXdmpRandom1", p.xdmp.random(p.col("1")), true, null, null, null, "0", new ServerExpression[]{ p.xs.unsignedLong(1) });
16001600
}
16011601

16021602
@Test
@@ -1656,12 +1656,12 @@ public void testXdmpStep642Exec() {
16561656

16571657
@Test
16581658
public void testXdmpStrftime2Exec() {
1659-
executeTester("testXdmpStrftime2", p.xdmp.strftime(p.col("1"), p.col("2")), true, null, null, null, "Wed, 06 Jan 2016 17:13:50", new ServerExpression[]{ p.xs.string("%a, %d %b %Y %H:%M:%S"), p.xs.dateTime("2016-01-06T17:13:50.873594-08:00") });
1659+
executeTester("testXdmpStrftime2", p.xdmp.strftime(p.col("1"), p.col("2")), true, null, null, null, "Thu, 07 Jan 2016 01:13:50", new ServerExpression[]{ p.xs.string("%a, %d %b %Y %H:%M:%S"), p.xs.dateTime("2016-01-06T17:13:50.873594-08:00") });
16601660
}
16611661

16621662
@Test
16631663
public void testXdmpTimestampToWallclock1Exec() {
1664-
executeTester("testXdmpTimestampToWallclock1", p.xdmp.timestampToWallclock(p.col("1")), true, "xs:dateTime", null, null, "1969-12-31T16:00:00.0000001", new ServerExpression[]{ p.xs.unsignedLong(1) });
1664+
executeTester("testXdmpTimestampToWallclock1", p.xdmp.timestampToWallclock(p.col("1")), true, "xs:dateTime", null, null, "1970-01-01T00:00:00.0000001", new ServerExpression[]{ p.xs.unsignedLong(1) });
16651665
}
16661666

16671667
@Test
@@ -1672,7 +1672,7 @@ public void testXdmpType1Exec() {
16721672
@Test
16731673
@ExtendWith(RequiresML11.class)
16741674
public void testXdmpUnquote1Exec() {
1675-
executeTester("testXdmpUnquote1", p.xdmp.unquote(p.col("1")), false, null, "array", Format.JSON, "[123]", new ServerExpression[]{ p.xs.string("[123]") });
1675+
executeTester("testXdmpUnquote1", p.xdmp.unquote(p.col("1")), false, null, "array", Format.JSON, "[123]", new ServerExpression[]{p.xs.string("[123]")});
16761676
}
16771677

16781678
@Test

marklogic-client-api/src/test/java/com/marklogic/client/test/rows/NewOpticMethodsInElevenDotOneTest.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,10 @@ void joinDocAndUri() {
6262
@ExtendWith(RequiresML12.class)
6363
void documentRootQuery() {
6464
List<RowRecord> rows = resultRows(op
65-
.fromDocUris(op.cts.documentRootQuery("suggest"))
65+
.fromDocUris(op.cts.documentRootQuery("musician"))
6666
);
6767

68-
assertEquals(2, rows.size());
69-
assertEquals("/sample/suggestion.xml", ((TextNode) rows.get(0).get("uri")).asText());
70-
assertEquals("/sample2/suggestion.xml", ((TextNode) rows.get(1).get("uri")).asText());
68+
assertEquals(4, rows.size());
7169
}
7270

7371
@Test

0 commit comments

Comments
 (0)