Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertThrows;
import static org.junit.jupiter.api.Assertions.assertTrue;

public class AdjustQueryBatcherThreadCountTest extends AbstractFunctionalTest {

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

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

@Test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
import com.marklogic.client.io.StringHandle;
import com.marklogic.client.row.RowManager;
import com.marklogic.client.test.Common;
import com.marklogic.client.test.junit5.RequiresML11;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.extension.ExtendWith;

import static org.junit.jupiter.api.Assertions.assertEquals;
import static org.junit.jupiter.api.Assertions.assertTrue;

@ExtendWith(RequiresML11.class)
public class GraphQLTest extends AbstractOpticUpdateTest {

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