Skip to content

Commit 7e73d2b

Browse files
committed
GraphQL tests should only run on MarkLogic 11
Also tweaked AdjustQueryBatcher test based on intermittent failure on Jenkins.
1 parent 07602fb commit 7e73d2b

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

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

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
import static org.junit.jupiter.api.Assertions.assertEquals;
1616
import static org.junit.jupiter.api.Assertions.assertThrows;
17+
import static org.junit.jupiter.api.Assertions.assertTrue;
1718

1819
public class AdjustQueryBatcherThreadCountTest extends AbstractFunctionalTest {
1920

@@ -40,8 +41,12 @@ void increaseThreadCount() {
4041
dmm.stopJob(qb);
4142

4243
assertEquals(20, uriCount.get());
43-
assertEquals(3, threadNames.size(), "3 threads should have processed all the batches, as the thread count " +
44-
"was increased from 1 to 3 100ms into the job.");
44+
int threadNameCount = threadNames.size();
45+
assertTrue(threadNameCount == 3 || threadNameCount == 4,
46+
"3 threads should have processed all the batches, as the thread count was increased from 1 to 3 100ms " +
47+
"into the job. 4 thread names appears to be okay too; that has occurred when the test is run in " +
48+
"Jenkins, and it may be due to 3 new thread names being created by the Java executor when the thread " +
49+
"count is adjusted from 1 to 3.");
4550
}
4651

4752
@Test

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,15 @@
66
import com.marklogic.client.io.StringHandle;
77
import com.marklogic.client.row.RowManager;
88
import com.marklogic.client.test.Common;
9+
import com.marklogic.client.test.junit5.RequiresML11;
910
import org.junit.jupiter.api.BeforeEach;
1011
import org.junit.jupiter.api.Test;
12+
import org.junit.jupiter.api.extension.ExtendWith;
1113

1214
import static org.junit.jupiter.api.Assertions.assertEquals;
1315
import static org.junit.jupiter.api.Assertions.assertTrue;
1416

17+
@ExtendWith(RequiresML11.class)
1518
public class GraphQLTest extends AbstractOpticUpdateTest {
1619

1720
private final static String QUERY = "query myQuery { opticUnitTest_musician {firstName lastName}}";

0 commit comments

Comments
 (0)