Skip to content

Commit c6544ce

Browse files
committed
Merge branch 'release-5.5.1'
2 parents 3eefe94 + 0a68a36 commit c6544ce

File tree

106 files changed

+3543
-737
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+3543
-737
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,15 @@
11
# CHANGELOG
22

3+
## 5.5.1
4+
#### New Functionality
5+
- [#1296](https://github.com/marklogic/java-client-api/issues/1296) - Type anyDocument support for data service - Server release 10.0-7 or above required
6+
- #1314, #1315 - Support for Optic features Bucket group and sample by - Server release 10.0-8 or above required
7+
8+
#### Improvements and Bug Fixes
9+
- [#1309](https://github.com/marklogic/java-client-api/issues/1309) - Upgrade to Jackson 2.12.4
10+
- [#1316](https://github.com/marklogic/java-client-api/issues/1316) - Optic fromSPARQL method support options parameter - Server release 10.0-8 or above required
11+
- [#1322](https://github.com/marklogic/java-client-api/issues/1322) - Method facetBy doesn't work with namedGroup
12+
313
## 5.5.0
414
#### New Functionality
515
- [#1294](https://github.com/marklogic/java-client-api/issues/1294) - New Optic features Redaction, generate views - Server release 10.0-7 or above required

NOTICE.txt

Lines changed: 33 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ Unless required by applicable law or agreed to in writing, software distributed
1010

1111
To the extent required by the applicable open source license, a complete machine-readable copy of the source code corresponding to such code is available upon request. This offer is valid to anyone in receipt of this information and shall expire three years following the date of the final distribution of this product version by MarkLogic. To obtain such source code, send an email to legal@marklogic.com. Please specify the product and version for which you are requesting source code.
1212

13-
The following software may be included in this project (last updated May 23, 2021):
14-
13+
The following software may be included in this project (last updated September 17, 2021):
1514

15+
1616
@angular-mdl/core 6.0.1
1717
Attribution Statements
1818
http://mseemann.io/angular2-mdl/
@@ -1738,7 +1738,7 @@ Copyright (c) 2009-2014 Luaj.org.
17381738
Copyright Statements
17391739
Axel Kramer
17401740

1741-
License Text (Error! Hyperlink reference not valid.)
1741+
License Text (https://spdx.org/licenses/EPL-1.0.html)
17421742
Made available under the Eclipse Public License 1.0. See Appendix for full text.
17431743

17441744
Source materials are available for download at: https://bitbucket.org/axelclk/info.bliki.wiki/src
@@ -6115,6 +6115,18 @@ License Text (http://spdx.org/licenses/MIT)
61156115
Made available under the MIT License. See Appendix for full text.
61166116

61176117
Source materials are available for download at: https://github.com/gulpjs/vinyl
6118+
vis-timeline 7.3.6
6119+
Attribution Statements
6120+
https://github.com/visjs/vis-timeline
6121+
6122+
Copyright Statements
6123+
Copyright (c) 2014-2017 Almende B.V. and contributors
6124+
Copyright (c) 2017-2019 vis.js contributors
6125+
6126+
License Text (http://spdx.org/licenses/MIT)
6127+
Made available under the MIT License. See Appendix for full text.
6128+
6129+
Source materials are available for download at: https://github.com/visjs/vis-timeline
61186130
Wikipedia content
61196131
Attribution Statements
61206132
https://www.wikipedia.org/
@@ -6238,13 +6250,12 @@ Made available under the MIT License. See Appendix for full text.
62386250

62396251
Source materials are available for download at: https://github.com/angular/zone.js
62406252

6241-
6253+
62426254
Appendix
62436255

62446256
License Text
62456257

6246-
6247-
6258+
62486259
Apache License 2.0
62496260
https://spdx.org/licenses/Apache-2.0.html
62506261

@@ -6321,8 +6332,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
63216332
See the License for the specific language governing permissions and
63226333
limitations under the License.
63236334

6324-
6325-
6335+
63266336
BSD 2-Clause "Simplified" License
63276337
https://spdx.org/licenses/BSD-2-Clause.html
63286338

@@ -6336,8 +6346,7 @@ Redistribution and use in source and binary forms, with or without modification,
63366346

63376347
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
63386348

6339-
6340-
6349+
63416350
BSD 3-Clause "New" or "Revised" License
63426351
https://spdx.org/licenses/BSD-3-Clause.html
63436352

@@ -6352,8 +6361,7 @@ Redistribution and use in source and binary forms, with or without modification,
63526361
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
63536362

63546363
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
6355-
6356-
6364+
63576365
Common Development and Distribution License 1.1
63586366
https://spdx.org/licenses/CDDL-1.1.html
63596367

@@ -6466,8 +6474,7 @@ As between Initial Developer and the Contributors, each party is responsible for
64666474
NOTICE PURSUANT TO SECTION 9 OF THE COMMON DEVELOPMENT AND DISTRIBUTION LICENSE (CDDL)
64676475
The code released under the CDDL shall be governed by the laws of the State of California (excluding conflict-of-law provisions). Any litigation relating to this License shall be subject to the jurisdiction of the Federal Courts of the Northern District of California and the state courts of the State of California, with venue lying in Santa Clara County, California.
64686476

6469-
6470-
6477+
64716478
Creative Commons Attribution Share Alike 3.0 Unported
64726479
https://spdx.org/licenses/CC-BY-SA-3.0.html
64736480

@@ -6564,25 +6571,23 @@ Except for the limited purpose of indicating to the public that the Work is lice
65646571

65656572
Creative Commons may be contacted at http://creativecommons.org/.
65666573

6567-
6568-
6574+
65696575
Do What The F*ck You Want To Public License
65706576
https://spdx.org/licenses/WTFPL.html
65716577

6572-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
6578+
DO WHAT THE F*CK YOU WANT TO PUBLIC LICENSE
65736579
Version 2, December 2004
65746580

65756581
Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>
65766582

65776583
Everyone is permitted to copy and distribute verbatim or modified copies of this license document, and changing it is allowed as long as the name is changed.
65786584

6579-
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
6585+
DO WHAT THE F*CK YOU WANT TO PUBLIC LICENSE
65806586
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
65816587

6582-
0. You just DO WHAT THE FUCK YOU WANT TO.
6583-
6584-
6588+
0. You just DO WHAT THE F*CK YOU WANT TO.
65856589

6590+
65866591
Eclipse Public License 1.0
65876592
https://spdx.org/licenses/EPL-1.0.html
65886593

@@ -6659,8 +6664,7 @@ Everyone is permitted to copy and distribute copies of this Agreement, but in or
66596664

66606665
This Agreement is governed by the laws of the State of New York and the intellectual property laws of the United States of America. No party to this Agreement will bring a legal action under this Agreement more than one year after the cause of action arose. Each party waives its rights to a jury trial in any resulting litigation.
66616666

6662-
6663-
6667+
66646668
Eclipse Public License 2.0
66656669
https://spdx.org/licenses/EPL-2.0.html
66666670

@@ -6742,8 +6746,7 @@ Simply including a copy of this Agreement, including this Exhibit A is not suffi
67426746

67436747
If it is not possible or desirable to put the notice in a particular file, then You may include the notice in a location (such as a LICENSE file in a relevant directory) where a recipient would be likely to look for such a notice.
67446748

6745-
You may add additional accurate notices of copyright ownership.
6746-
6749+
You may add additional accurate notices of copyright ownership. 
67476750
ISC License
67486751
https://spdx.org/licenses/ISC.html
67496752

@@ -6756,8 +6759,7 @@ Permission to use, copy, modify, and/or distribute this software for any purpose
67566759

67576760
THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
67586761

6759-
6760-
6762+
67616763
JSON License
67626764
https://spdx.org/licenses/JSON.html
67636765

@@ -6773,8 +6775,7 @@ The Software shall be used for Good, not Evil.
67736775

67746776
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
67756777

6776-
6777-
6778+
67786779
MIT License
67796780
http://spdx.org/licenses/MIT
67806781

@@ -6788,8 +6789,7 @@ The above copyright notice and this permission notice (including the next paragr
67886789

67896790
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
67906791

6791-
6792-
6792+
67936793
Mozilla Public License 2.0
67946794
https://spdx.org/licenses/MPL-2.0.html
67956795

@@ -6926,8 +6926,7 @@ Exhibit B - "Incompatible With Secondary Licenses" Notice
69266926

69276927
This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
69286928

6929-
6930-
6929+
69316930
SIL Open Font License 1.1
69326931
https://spdx.org/licenses/OFL-1.1.html
69336932

@@ -6974,8 +6973,7 @@ DISCLAIMER
69746973

69756974
THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM OTHER DEALINGS IN THE FONT SOFTWARE.
69766975

6977-
6978-
6976+
69796977
The Unlicense
69806978
https://spdx.org/licenses/Unlicense.html
69816979

gradle.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
group=com.marklogic
2-
version=5.5.0
3-
releaseVersion=5.5.0
2+
version=5.5.1
3+
releaseVersion=5.5.1
44
describedName=MarkLogic Java Client API
55
publishUrl=file:../marklogic-java/releases

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/QueryBatcherJobReportTest.java

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public static void setUpBeforeClass() throws Exception {
125125
}
126126

127127
// FileHandle
128-
fileJson = FileUtils.toFile(WriteHostBatcherTest.class.getResource(TEST_DIR_PREFIX + "dir.json"));
128+
fileJson = FileUtils.toFile(BasicJavaClientREST.class.getResource(TEST_DIR_PREFIX + "dir.json"));
129129
fileHandle = new FileHandle(fileJson);
130130
fileHandle.setFormat(Format.JSON);
131131
meta1 = new DocumentMetadataHandle().withCollections("JsonTransform");
@@ -170,13 +170,13 @@ public static void setUpBeforeClass() throws Exception {
170170
metadata.setVersion("0.1");
171171
// get the transform file
172172
File transformFile = FileUtils
173-
.toFile(WriteHostBatcherTest.class.getResource(TEST_DIR_PREFIX + "add-attr-xquery-transform.xqy"));
173+
.toFile(BasicJavaClientREST.class.getResource(TEST_DIR_PREFIX + "add-attr-xquery-transform.xqy"));
174174
FileHandle transformHandle = new FileHandle(transformFile);
175175
transMgr.writeXQueryTransform("add-attr-xquery-transform", transformHandle, metadata);
176176

177177
// JS Transformation
178178
File transformFile1 = FileUtils
179-
.toFile(WriteHostBatcherTest.class.getResource(TEST_DIR_PREFIX + "javascript_transform.sjs"));
179+
.toFile(BasicJavaClientREST.class.getResource(TEST_DIR_PREFIX + "javascript_transform.sjs"));
180180
FileHandle transformHandle1 = new FileHandle(transformFile1);
181181
transMgr.writeJavascriptTransform("jsTransform", transformHandle1);
182182

@@ -210,7 +210,9 @@ public void jobReport() throws Exception {
210210
Assert.assertTrue("Job Name incorrect", batcher.getJobName().trim().equalsIgnoreCase("XmlTransform"));
211211
batcher.awaitCompletion(Long.MAX_VALUE, TimeUnit.DAYS);
212212
dmManager.stopJob(queryTicket);
213-
Assert.assertEquals(dmManager.getJobReport(queryTicket).getSuccessBatchesCount(), 4);
213+
System.out.println("Number of success batches " + dmManager.getJobReport(queryTicket).getSuccessBatchesCount());
214+
// Account for cluster env and number of forests; and/or single node env test runs.
215+
Assert.assertTrue(dmManager.getJobReport(queryTicket).getSuccessBatchesCount() >= 4);
214216

215217
batcher = dmManager.newQueryBatcher(new StructuredQueryBuilder().collection("XmlTransform"))
216218
.withBatchSize(500)
@@ -510,13 +512,16 @@ public void stopTransformJobTest() throws Exception {
510512
transform.put("value", "French");
511513
List<String> skippedBatch = new ArrayList<>();
512514
List<String> successBatch = new ArrayList<>();
515+
AtomicLong skippedApplyTransCount = new AtomicLong(0L);
516+
513517
ApplyTransformListener listener = new ApplyTransformListener().withTransform(transform)
514518
.withApplyResult(ApplyResult.REPLACE).onSuccess(batch -> {
519+
515520
List<String> batchList = Arrays.asList(batch.getItems());
516521
successBatch.addAll(batchList);
517-
System.out.println("stopTransformJobTest: Success: " + batch.getItems()[0]);
522+
/*System.out.println("stopTransformJobTest: Success: " + batch.getItems()[0]);
518523
System.out.println("stopTransformJobTest: Success: " + dbClient.newServerEval()
519-
.xquery("fn:doc(\"" + batch.getItems()[0] + "\")").eval().next().getString());
524+
.xquery("fn:doc(\"" + batch.getItems()[0] + "\")").eval().next().getString());*/
520525
}).onSkipped(batch -> {
521526
List<String> batchList = Arrays.asList(batch.getItems());
522527
skippedBatch.addAll(batchList);
@@ -535,13 +540,12 @@ public void stopTransformJobTest() throws Exception {
535540

536541
batcher = batcher.onUrisReady((batch) -> {
537542
successCount.set(dmManager.getJobReport(queryTicket).getSuccessEventsCount());
538-
539543
}).onUrisReady(listener);
540544
queryTicket = dmManager.startJob(batcher);
541545
Thread.currentThread().sleep(4000L);
542546
dmManager.stopJob(queryTicket);
543547

544-
AtomicInteger count = new AtomicInteger(0);
548+
AtomicInteger appliedTranscount = new AtomicInteger(0);
545549
QueryBatcher resultBatcher = dmManager
546550
.newQueryBatcher(new StructuredQueryBuilder().collection("XmlTransform"))
547551
.withBatchSize(25).withThreadCount(5)
@@ -551,9 +555,14 @@ public void stopTransformJobTest() throws Exception {
551555
while (page.hasNext()) {
552556
DocumentRecord rec = page.next();
553557
rec.getContent(dh);
554-
if (dh.get().getElementsByTagName("foo").item(0).getAttributes().item(0) == null) {
555-
count.incrementAndGet();
556-
System.out.println("stopTransformJobTest: skipped in server" + rec.getUri());
558+
if (dh.get().getElementsByTagName("foo").item(0).hasAttributes()) {
559+
String appliedTransStrValue = dh.get().getElementsByTagName("foo").item(0).getAttributes().item(0).getNodeValue();
560+
if (appliedTransStrValue.equalsIgnoreCase("French")) {
561+
appliedTranscount.incrementAndGet();
562+
System.out.println("stopTransformJobTest: Did not get skipped in server" + rec.getUri());
563+
}
564+
}else {
565+
skippedApplyTransCount.incrementAndGet();
557566
}
558567
}
559568

@@ -562,11 +571,12 @@ public void stopTransformJobTest() throws Exception {
562571
resultBatcher.awaitCompletion();
563572

564573
System.out.println("stopTransformJobTest: Success: " + successBatch.size());
574+
System.out.println("stopTransformJobTest: Skipped Apply Transform count : " + skippedApplyTransCount.get());
565575
System.out.println("stopTransformJobTest: Skipped: " + skippedBatch.size());
566-
System.out.println("stopTransformJobTest : count " + count);
576+
System.out.println("stopTransformJobTest : Applied Trans count " + appliedTranscount.get());
567577

568578
System.out.println("stopTransformJobTest : successCount.get() " + successCount.get());
569-
Assert.assertEquals(successCount.get(), successBatch.size());
579+
assertTrue("Number of docs transformed must be <= number of docs selected", appliedTranscount.get() <= successBatch.size());
570580
}
571581

572582
/* Test 1 setMaxBatches(2035) - maximum specified in advance
@@ -703,9 +713,9 @@ public void run() {
703713
// Validate Test 1 setMaxBatches(2035)
704714
System.out.println("Max URIs size is : " + batchResults.size());
705715
/* 12 times 2035 equals 24420 with one Thread on QueryBatcher.
706-
* With thread count > 1 on QueryBatcher, batchResults size is less than 24420.
716+
* With thread count > 1 on QueryBatcher, batchResults size is greater than 24420.
707717
*/
708-
assertTrue("Stop QueryBatcher with setMaxBatches set to 2035 is incorrect", batchResults.size() == 24420);
718+
assertTrue("Stop QueryBatcher with setMaxBatches set to 2035 is incorrect", batchResults.size() >= 24420);
709719

710720
/* Test 2 setMaxBatches()
711721
*/
@@ -759,7 +769,7 @@ public void run() {
759769
System.out.println("Doc count after setMaxBatches() is called " + batchResults2.size());
760770

761771
assertTrue("Batches of URIs collected so far", batchResults2.size() > 0);
762-
assertTrue("Number of Uris collected does not fall in the range", (batchResults2.size()>initialUrisSize && batchResults2.size()< 2436));
772+
assertTrue("Number of Uris collected does not fall in the range", (batchResults2.size()>initialUrisSize && batchResults2.size()<= 2436));
763773
}
764774
catch (Exception ex) {
765775
ex.printStackTrace();

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/RowBatcherFuncTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ public void testJoinfromViewfronLexicons() throws KeyManagementException, NoSuch
407407
// plan2 - fromLexicons
408408
PlanBuilder.ModifyPlan plan2 = p.fromLexicons(indexes, "myCity");
409409

410-
PlanBuilder.ModifyPlan output = plan1.joinFullOuter(plan2);
410+
PlanBuilder.ModifyPlan output = plan1.joinFullOuter(plan2).orderBy(p.col("id")).offsetLimit(0, 2);
411411
rowsBatcherOfJsonObj.withBatchView(output);
412412

413413
ArrayList<String> exptdCity = new ArrayList(Arrays.asList("beijing", "cape town"));

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/datamovement/functionaltests/StringQueryHostBatcherTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,7 @@
3737
import com.marklogic.client.query.*;
3838
import com.marklogic.client.type.CtsQueryExpr;
3939
import com.marklogic.client.util.EditableNamespaceContext;
40-
import org.junit.After;
41-
import org.junit.AfterClass;
42-
import org.junit.BeforeClass;
43-
import org.junit.Ignore;
44-
import org.junit.Test;
40+
import org.junit.*;
4541
import org.w3c.dom.DOMException;
4642
import org.w3c.dom.Document;
4743
import org.xml.sax.SAXException;
@@ -130,10 +126,6 @@ public static void setUpBeforeClass() throws Exception {
130126

131127
createUserRolesWithPrevilages("test-eval", "xdbc:eval", "xdbc:eval-in", "xdmp:eval-in", "any-uri", "xdbc:invoke");
132128
createRESTUser("eval-user", "x", "test-eval", "rest-admin", "rest-writer", "rest-reader", "rest-extension-user", "manage-user");
133-
134-
// For use with Java/REST Client API
135-
client = getDatabaseClient("eval-user", "x", getConnType());
136-
dmManager = client.newDataMovementManager();
137129
}
138130

139131
/**
@@ -153,12 +145,20 @@ public static void tearDownAfterClass() throws Exception {
153145
deleteForest(fNames[0]);
154146
}
155147

148+
@Before
149+
public void setUp() throws Exception {
150+
System.out.println("In setup");
151+
client = getDatabaseClient("eval-user", "x", getConnType());
152+
dmManager = client.newDataMovementManager();
153+
}
154+
156155
/**
157156
* @throws java.lang.Exception
158157
*/
159158
@After
160159
public void tearDown() throws Exception {
161160
System.out.println("In tearDown");
161+
client.release();
162162
clearDB(restServerPort);
163163
}
164164

0 commit comments

Comments
 (0)