Skip to content

Commit 4a20e5f

Browse files
committed
[fix] isolate preexisting xq specs
so they no longer depend on state from xml testset
1 parent 0312757 commit 4a20e5f

23 files changed

+40
-9
lines changed

extensions/indexes/lucene/src/test/xquery/lucene/analyzers.xql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@ declare variable $analyze:XCONF2 :=
5353
declare
5454
%test:setUp
5555
function analyze:setup() {
56+
let $_ := (xmldb:create-collection("/db/system", "config"), xmldb:create-collection("/db/system/config", "db"))
5657
let $testCol := xmldb:create-collection("/db", "lucenetest")
5758
let $testCol1 := xmldb:create-collection("/db/lucenetest", "test1")
5859
let $testCol2 := xmldb:create-collection("/db/lucenetest", "test2")

extensions/indexes/lucene/src/test/xquery/lucene/facets.xql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,7 @@ declare variable $facet:XCONF1 :=
285285
declare
286286
%test:setUp
287287
function facet:setup() {
288+
let $_ := (xmldb:create-collection("/db/system", "config"), xmldb:create-collection("/db/system/config", "db"))
288289
let $testCol := xmldb:create-collection("/db", "lucenetest")
289290
let $personsCol := xmldb:create-collection("/db/lucenetest", "persons")
290291
let $confCol := xmldb:create-collection("/db/system/config/db", "lucenetest")

extensions/indexes/lucene/src/test/xquery/lucene/ft-match.xql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ declare variable $ftt:COLLECTION := "/db/" || $ftt:COLLECTION_NAME;
5454
declare
5555
%test:setUp
5656
function ftt:setup() {
57+
(xmldb:create-collection("/db/system", "config"), xmldb:create-collection("/db/system/config", "db")),
5758
xmldb:create-collection("/db/system/config/db", $ftt:COLLECTION_NAME),
5859
xmldb:store("/db/system/config/db/" || $ftt:COLLECTION_NAME, "collection.xconf", $ftt:COLLECTION_CONFIG),
5960
xmldb:create-collection("/db", $ftt:COLLECTION_NAME),

extensions/indexes/lucene/src/test/xquery/lucene/inline-ignore.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@ declare variable $inlg:EXPECTED_IGNORED_MATCH as element(p) :=
8787
declare
8888
%test:setUp
8989
function inlg:setUp() {
90-
( xmldb:create-collection("/db", $inlg:COLLECTION_NAME),
90+
( xmldb:create-collection("/db/system", "config"),
91+
xmldb:create-collection("/db/system/config", "db"),
92+
xmldb:create-collection("/db", $inlg:COLLECTION_NAME),
9193
xmldb:create-collection("/db/system/config/db", $inlg:COLLECTION_NAME),
9294
xmldb:store("/db/system/config/db/" || $inlg:COLLECTION_NAME, "collection.xconf", $inlg:XCONF),
9395
xmldb:store($inlg:COLLECTION, "text.xml", $inlg:XML),

extensions/indexes/lucene/src/test/xquery/lucene/inline_elements.xql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ declare variable $fti:COLLECTION := "/db/" || $fti:COLLECTION_NAME;
5050
declare
5151
%test:setUp
5252
function fti:setup() {
53+
(xmldb:create-collection("/db/system", "config"), xmldb:create-collection("/db/system/config", "db")),
5354
xmldb:create-collection("/db/system/config/db", $fti:COLLECTION_NAME),
5455
xmldb:store("/db/system/config/db/" || $fti:COLLECTION_NAME, "collection.xconf", $fti:COLLECTION_CONFIG),
5556
xmldb:create-collection("/db", $fti:COLLECTION_NAME),

extensions/indexes/lucene/src/test/xquery/lucene/match-highlighting.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ declare variable $mhlt:EXPECTED_NONE as element(el) :=
7676
declare
7777
%test:setUp
7878
function mhlt:setUp() {
79-
( xmldb:create-collection("/db", $mhlt:COLLECTION_NAME),
79+
( xmldb:create-collection("/db/system", "config"),
80+
xmldb:create-collection("/db/system/config", "db"),
81+
xmldb:create-collection("/db", $mhlt:COLLECTION_NAME),
8082
xmldb:create-collection("/db/system/config/db", $mhlt:COLLECTION_NAME),
8183
xmldb:store("/db/system/config/db/" || $mhlt:COLLECTION_NAME, "collection.xconf", $mhlt:XCONF),
8284
xmldb:store($mhlt:COLLECTION, "test.xml", $mhlt:XML),

extensions/indexes/lucene/src/test/xquery/lucene/optimizer-ft.xql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ declare variable $fto:COLLECTION := "/db/" || $fto:COLLECTION_NAME;
7676
declare
7777
%test:setUp
7878
function fto:setup() {
79+
(xmldb:create-collection("/db/system", "config"), xmldb:create-collection("/db/system/config", "db")),
7980
xmldb:create-collection("/db/system/config/db", $fto:COLLECTION_NAME),
8081
xmldb:store("/db/system/config/db/" || $fto:COLLECTION_NAME, "collection.xconf", $fto:COLLECTION_CONFIG),
8182
xmldb:create-collection("/db", $fto:COLLECTION_NAME),

extensions/indexes/lucene/src/test/xquery/lucene/parenthesized-context.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,9 @@ function pctx:term-callback($term as xs:string, $data as xs:int+) as element(ter
109109
declare
110110
%test:setUp
111111
function pctx:setUp() {
112-
( xmldb:create-collection("/db", $pctx:COLLECTION_NAME),
112+
( xmldb:create-collection("/db/system", "config"),
113+
xmldb:create-collection("/db/system/config", "db"),
114+
xmldb:create-collection("/db", $pctx:COLLECTION_NAME),
113115
xmldb:create-collection("/db/system/config/db", $pctx:COLLECTION_NAME),
114116
xmldb:store("/db/system/config/db/" || $pctx:COLLECTION_NAME, "collection.xconf", $pctx:XCONF),
115117
xmldb:store($pctx:COLLECTION, "test.xml", $pctx:XML),

extensions/indexes/lucene/src/test/xquery/lucene/parenthesized-location-step.xql

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,9 @@ declare variable $plst:EXPECTED_ATTR_RESULT as element(result)+ := (
101101
declare
102102
%test:setUp
103103
function plst:setUp() {
104-
( xmldb:create-collection("/db", $plst:COLLECTION_NAME),
104+
( xmldb:create-collection("/db/system", "config"),
105+
xmldb:create-collection("/db/system/config", "db"),
106+
xmldb:create-collection("/db", $plst:COLLECTION_NAME),
105107
xmldb:create-collection("/db/system/config/db", $plst:COLLECTION_NAME),
106108
xmldb:store("/db/system/config/db/" || $plst:COLLECTION_NAME, "collection.xconf", $plst:XCONF),
107109
xmldb:store($plst:COLLECTION, "test.xml", $plst:XML),

extensions/indexes/lucene/src/test/xquery/lucene/plain-ft-functions.xql

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ declare variable $pftf:COLLECTION_BINARY := "/db/binary";
4848
declare
4949
%test:setUp
5050
function pftf:setUp() {
51-
( xmldb:create-collection("/db/system/config", "db"),
51+
( xmldb:create-collection("/db/system", "config"),
52+
xmldb:create-collection("/db/system/config", "db"),
5253
xmldb:store("/db/system/config/db", "collection.xconf", $pftf:XCONF),
5354
xmldb:create-collection("/db", "binary"),
5455
xmldb:store($pftf:COLLECTION_BINARY, "data1.txt", "AAAAAA", "text/plain"),

0 commit comments

Comments
 (0)