Skip to content

Commit 25677b0

Browse files
committed
Ignoring functional tests excluded in Gradle
These are somehow still running in the Jenkins build, so using an @ignore annotation
1 parent 2bb01f8 commit 25677b0

File tree

9 files changed

+33
-21
lines changed

9 files changed

+33
-21
lines changed

Jenkinsfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ def runtests(String type, String version){
4343
export GRADLE_USER_HOME=$WORKSPACE/$GRADLE_DIR
4444
export PATH=$GRADLE_USER_HOME:$JAVA_HOME/bin:$PATH
4545
cd java-client-api
46+
./gradlew -i mlDeploy -PmlForestDataDirectory=/space
4647
./gradlew marklogic-client-api-functionaltests:runFunctionalTests || true
4748
'''
4849
sh label:'post-test-process', script: '''

marklogic-client-api-functionaltests/build.gradle

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ test {
77
/* For use in testing TestDatabaseClientKerberosFromFile */
88
systemProperty "keytabFile", System.getProperty("keytabFile")
99
systemProperty "principal", System.getProperty("principal")
10-
10+
1111
exclude 'com/marklogic/client/functionaltest/TestSSLConnection.class'
1212
exclude 'com/marklogic/client/functionaltest/TestBug18993.class'
1313
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithKerberos.class'
@@ -59,12 +59,6 @@ task runSlowFunctionalTests(type: Test) {
5959
description = "Run slow functional tests; i.e. those that setup/teardown custom app servers / databases"
6060
include "com/marklogic/client/datamovement/functionaltests/**"
6161
include "com/marklogic/client/functionaltest/**"
62-
exclude 'com/marklogic/client/functionaltest/TestSSLConnection.class'
63-
exclude 'com/marklogic/client/functionaltest/TestBug18993.class'
64-
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithKerberos.class'
65-
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientKerberosFromFile.class'
66-
exclude 'com/marklogic/client/functionaltest/TestDatabaseClientWithCertBasedAuth.class'
67-
exclude 'com/marklogic/client/functionaltest/TestSandBox.class'
6862
}
6963

7064
task runFunctionalTests {

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestBug18993.java

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,13 @@
2222
import java.security.KeyManagementException;
2323
import java.security.NoSuchAlgorithmException;
2424

25-
import org.junit.After;
26-
import org.junit.AfterClass;
27-
import org.junit.BeforeClass;
28-
import org.junit.Test;
25+
import org.junit.*;
2926

3027
import com.marklogic.client.DatabaseClient;
3128
import com.marklogic.client.document.XMLDocumentManager;
3229
import com.marklogic.client.io.StringHandle;
3330

31+
@Ignore
3432
public class TestBug18993 extends BasicJavaClientREST {
3533

3634
private static String dbName = "Bug18993DB";

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestDatabaseClientKerberosFromFile.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@
122122
* Copy the services.keytab file to ML Server data directory.
123123
*/
124124

125+
@Ignore("Ignored because it was previously ignored in build.gradle though without explanation")
125126
public class TestDatabaseClientKerberosFromFile extends BasicJavaClientREST {
126127

127128
private static String dbName = "TestDBClientWithKerberosFileDB";

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestDatabaseClientWithCertBasedAuth.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,11 +32,7 @@
3232
import org.apache.http.entity.StringEntity;
3333
import org.apache.http.impl.client.DefaultHttpClient;
3434
import org.apache.http.util.EntityUtils;
35-
import org.junit.After;
36-
import org.junit.AfterClass;
37-
import org.junit.Before;
38-
import org.junit.BeforeClass;
39-
import org.junit.Test;
35+
import org.junit.*;
4036

4137
import com.fasterxml.jackson.databind.JsonNode;
4238
import com.fasterxml.jackson.databind.ObjectMapper;
@@ -50,6 +46,7 @@
5046

5147
import junit.framework.Assert;
5248

49+
@Ignore("Ignored because it was previously ignored in build.gradle though without explanation")
5350
public class TestDatabaseClientWithCertBasedAuth extends BasicJavaClientREST {
5451

5552
public static String newLine = System.getProperty("line.separator");

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestDatabaseClientWithKerberos.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@
103103
import com.marklogic.client.query.StructuredQueryDefinition;
104104
import com.marklogic.client.util.RequestLogger;
105105

106+
@Ignore("Ignored because it was previously ignored in build.gradle though without explanation")
106107
public class TestDatabaseClientWithKerberos extends BasicJavaClientREST {
107108

108109
private static String dbName = "TestDatabaseClientWithKerberosDB";

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestSSLConnection.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,15 @@
3131

3232
import org.junit.AfterClass;
3333
import org.junit.BeforeClass;
34+
import org.junit.Ignore;
3435
import org.junit.Test;
3536

3637
import com.marklogic.client.DatabaseClient;
3738
import com.marklogic.client.DatabaseClientFactory;
3839
import com.marklogic.client.DatabaseClientFactory.SSLHostnameVerifier;
3940
import com.marklogic.client.DatabaseClientFactory.SecurityContext;
4041

42+
@Ignore("Ignored because it was previously ignored in build.gradle though without explanation")
4143
public class TestSSLConnection extends BasicJavaClientREST {
4244

4345
private static String dbName = "TestSSLConnectionDB";

marklogic-client-api-functionaltests/src/test/java/com/marklogic/client/functionaltest/TestSandBox.java

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,7 @@
3636
import javax.xml.transform.TransformerException;
3737

3838
import org.custommonkey.xmlunit.exceptions.XpathException;
39-
import org.junit.After;
40-
import org.junit.AfterClass;
41-
import org.junit.Before;
42-
import org.junit.BeforeClass;
43-
import org.junit.Test;
39+
import org.junit.*;
4440
import org.w3c.dom.Document;
4541
import org.xml.sax.SAXException;
4642

@@ -85,6 +81,7 @@
8581
import com.marklogic.client.type.CtsReferenceExpr;
8682
import com.marklogic.client.type.XsStringSeqVal;
8783

84+
@Ignore("Ignored because it was previously ignored in build.gradle though without explanation")
8885
public class TestSandBox extends BasicJavaClientREST {
8986

9087
private static String dbName = "TestSandBox";

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
import com.fasterxml.jackson.databind.node.ObjectNode;
55
import com.marklogic.client.expression.PlanBuilder;
66
import com.marklogic.client.row.RowRecord;
7+
import com.marklogic.client.test.Common;
78
import org.junit.Before;
89
import org.junit.Test;
910
import org.springframework.util.StringUtils;
@@ -27,6 +28,10 @@ public class UnnestTest extends AbstractOpticUpdateTest {
2728
*/
2829
@Before
2930
public void insertTestDocument() {
31+
if (!Common.markLogicIsVersion11OrHigher()) {
32+
return;
33+
}
34+
3035
ObjectNode doc = mapper.createObjectNode();
3136
ArrayNode office = doc.putArray("office");
3237
Stream.of("Engineering:Cindy,Alice", "Sales:Bob", "Marketing: ").forEach(value -> {
@@ -41,6 +46,10 @@ public void insertTestDocument() {
4146

4247
@Test
4348
public void unnestInner() {
49+
if (!Common.markLogicIsVersion11OrHigher()) {
50+
return;
51+
}
52+
4453
PlanBuilder.ModifyPlan plan = op.fromView("unnestSchema", "unnestView")
4554
.bind(op.as("teamMemberNameArray", op.fn.tokenize(op.col("teamMembers"), op.xs.string(","))))
4655
.unnestInner("teamMemberNameArray", SINGLE_NAME_COLUMN)
@@ -55,6 +64,10 @@ public void unnestInner() {
5564

5665
@Test
5766
public void unnestInnerWithOrdinality() {
67+
if (!Common.markLogicIsVersion11OrHigher()) {
68+
return;
69+
}
70+
5871
PlanBuilder.ModifyPlan plan = op.fromView("unnestSchema", "unnestView")
5972
.bind(op.as("teamMemberNameArray", op.fn.tokenize(op.col("teamMembers"), op.xs.string(","))))
6073
.unnestInner("teamMemberNameArray", SINGLE_NAME_COLUMN, "index")
@@ -74,6 +87,10 @@ public void unnestInnerWithOrdinality() {
7487

7588
@Test
7689
public void unnestLeftOuter() {
90+
if (!Common.markLogicIsVersion11OrHigher()) {
91+
return;
92+
}
93+
7794
PlanBuilder.ModifyPlan plan = op.fromView("unnestSchema", "unnestView")
7895
.bind(op.as("teamMemberNameArray", op.fn.tokenize(op.col("teamMembers"), op.xs.string(","))))
7996
.unnestLeftOuter("teamMemberNameArray", SINGLE_NAME_COLUMN)
@@ -89,6 +106,10 @@ public void unnestLeftOuter() {
89106

90107
@Test
91108
public void unnestLeftOuterWithOrdinality() {
109+
if (!Common.markLogicIsVersion11OrHigher()) {
110+
return;
111+
}
112+
92113
PlanBuilder.ModifyPlan plan = op.fromView("unnestSchema", "unnestView")
93114
.bind(op.as("teamMemberNameArray", op.fn.tokenize(op.col("teamMembers"), op.xs.string(","))))
94115
.unnestLeftOuter("teamMemberNameArray", SINGLE_NAME_COLUMN, "myIndex")

0 commit comments

Comments
 (0)