Skip to content

Commit 82d7e99

Browse files
georgeajitgeorgeajit
authored andcommitted
No Task - Client created before each test to account for client timeout issues.
1 parent 75864b7 commit 82d7e99

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

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)