Skip to content

Commit 6328081

Browse files
committed
HPCC4J-594 Add support for skipping tests
- Updated version of surefire plugin to support excludes file - Added logic to generate an excludes file to GH actions - Separated test subproject test runs in GH actions - Removed old tests - Fixed surefire upgrade issues - Added excluded-tests.txt file with examples Signed-off-by: James McMullan James.McMullan@lexisnexis.com
1 parent f088b3d commit 6328081

File tree

12 files changed

+51
-124
lines changed

12 files changed

+51
-124
lines changed

.github/workflows/baremetal-regression-suite.yml

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,5 +176,22 @@ jobs:
176176
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
177177
restore-keys: ${{ runner.os }}-m2
178178

179-
- name: Build with Maven
180-
run: mvn -B --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false -Dhpccconn=http://eclwatch.default:8010 -Dwssqlconn=http://sql2ecl.default:8510 -DHPCC30117=open install
179+
- name: Exclude Tests
180+
env:
181+
EXCLUDES: ${{ vars.EXCLUDED_TESTS }}
182+
run: |
183+
echo $EXCLUDES >> excluded-tests.txt
184+
185+
- name: Build Project
186+
run: mvn clean install -DskipTests=true
187+
188+
- name: Run Commons-HPCC Tests
189+
run: mvn -pl commons-hpcc --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false verify
190+
191+
- name: Run WSClient Tests
192+
run: mvn -pl wsclient --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false -Dhpccconn=http://eclwatch.default:8010 -Dwssqlconn=http://sql2ecl.default:8510 verify
193+
194+
- name: Run DFSClient Tests
195+
run: mvn -pl dfsclient --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false -Dhpccconn=http://eclwatch.default:8010 verify
196+
197+

.github/workflows/k8s-regression-suite.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,5 +143,20 @@ jobs:
143143
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
144144
restore-keys: ${{ runner.os }}-m2
145145

146-
- name: Build with Maven
147-
run: mvn -B --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false -Dhpccconn=https://eclwatch.default:8010 -Dwssqlconn=https://sql2ecl.default:8510 -DHPCC30117=open install
146+
- name: Exclude Tests
147+
env:
148+
EXCLUDES: ${{ vars.EXCLUDED_TESTS }}
149+
run: |
150+
echo $EXCLUDES >> excluded-tests.txt
151+
152+
- name: Build Project
153+
run: mvn clean install -DskipTests=true
154+
155+
- name: Run Commons-HPCC Tests
156+
run: mvn -pl commons-hpcc --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false verify
157+
158+
- name: Run WSClient Tests
159+
run: mvn -pl wsclient --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false -Dhpccconn=https://eclwatch.default:8010 -Dwssqlconn=https://sql2ecl.default:8510 verify
160+
161+
- name: Run DFSClient Tests
162+
run: mvn -pl dfsclient --activate-profiles jenkins-on-demand -Dmaven.gpg.skip=true -Dmaven.javadoc.skip=true -Dmaven.test.failure.ignore=false -Dhpccconn=https://eclwatch.default:8010 verify

commons-hpcc/pom.xml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@
2727
<plugin>
2828
<artifactId>maven-surefire-plugin</artifactId>
2929
<version>${maven.surefire.version}</version>
30+
<configuration>
31+
<excludesFile>../excluded-tests.txt</excludesFile>
32+
</configuration>
3033
</plugin>
3134
</plugins>
3235
</build>

dfsclient/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@
3434
<value>org.hpccsystems.ws.client.TestResultNotifier</value>
3535
</property>
3636
</properties>
37+
<excludesFile>../excluded-tests.txt</excludesFile>
3738
</configuration>
3839
</plugin>
3940
<plugin>

excluded-tests.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# See: https://maven.apache.org/surefire/maven-surefire-plugin/examples/inclusion-exclusion.html#multiple-formats-in-one
2+
# Example:
3+
# **/*RampsDevRegressionTest.java

pom.xml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@
4545
<maven.deploy.version>2.8.2</maven.deploy.version>
4646
<maven.install.version>2.5.2</maven.install.version>
4747
<maven.jar.version>3.0.2</maven.jar.version>
48-
<maven.surefire.version>2.22.1</maven.surefire.version>
48+
<maven.surefire.version>3.2.5</maven.surefire.version>
4949
<antlr.version>4.10.1</antlr.version>
5050
<javax.mail.version>1.4</javax.mail.version>
5151
<jsch.version>0.1.54</jsch.version>
@@ -213,6 +213,7 @@
213213
<configuration>
214214
<argLine>${argLine}</argLine>
215215
<groups>${groups}</groups>
216+
<excludesFile>excluded-tests.txt</excludesFile>
216217
</configuration>
217218
</plugin>
218219
<plugin>
@@ -433,6 +434,7 @@
433434
<configuration>
434435
<argLine>${argLine}</argLine>
435436
<groups>${groups}</groups>
437+
<excludesFile>excluded-tests.txt</excludesFile>
436438
</configuration>
437439
</plugin>
438440
</plugins>
@@ -485,6 +487,7 @@
485487
<configuration>
486488
<argLine>${argLine}</argLine>
487489
<groups>${groups}</groups>
490+
<excludesFile>excluded-tests.txt</excludesFile>
488491
</configuration>
489492
</plugin>
490493
</plugins>
@@ -560,6 +563,7 @@
560563
<configuration>
561564
<argLine>${argLine}</argLine>
562565
<groups>${groups}</groups>
566+
<excludesFile>excluded-tests.txt</excludesFile>
563567
</configuration>
564568
</plugin>
565569
</plugins>

wsclient/pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@
8888
<value>org.hpccsystems.ws.client.TestResultNotifier</value>
8989
</property>
9090
</properties>
91+
<excludesFile>../excluded-tests.txt</excludesFile>
9192
</configuration>
9293
</plugin>
9394
</plugins>

wsclient/src/test/java/org/hpccsystems/ws/client/WSFileIOClientTest.java

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ public class WSFileIOClientTest extends BaseRemoteTest
4545
private final static String testfilename = System.getProperty("lztestfile", "myfilename.txt");
4646
private final static String targetLZ = System.getProperty("lzname", "localhost");
4747
private final static String targetLZPath = System.getProperty("lzpath", "/var/lib/HPCCSystems/mydropzone");
48-
private final static String HPCC_30117 = System.getProperty("HPCC30117", "fixed");
4948

5049
static
5150
{
@@ -57,18 +56,12 @@ public class WSFileIOClientTest extends BaseRemoteTest
5756

5857
if (System.getProperty("lzpath") == null)
5958
System.out.println("lzpath not provided - defaulting to /var/lib/HPCCSystems/mydropzone");
60-
61-
if (System.getProperty("HPCC30117") == null)
62-
System.out.println("HPCC30117 status not provided - defaulting to fixed");
63-
else
64-
System.out.println("HPCC30117 status: '" + HPCC_30117 + "'");
6559
}
6660

6761
@Test
6862
public void copyFile() throws Exception
6963
{
7064
Assume.assumeFalse("Test not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
71-
assumeTrue("Ignoring test 'copyFile' because HPCC-30117 is not fixed", HPCC_30117.equalsIgnoreCase("fixed"));
7265
String lzfile=System.currentTimeMillis() + "_csvtest.csv";
7366
String hpccfilename="temp::" + lzfile;
7467
client.createHPCCFile(lzfile, targetLZ, true);
@@ -145,15 +138,13 @@ public void copyFile() throws Exception
145138
public void AcreateHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
146139
{
147140
Assume.assumeFalse("Test not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
148-
assumeTrue("Ignoring test 'copyFile' because HPCC-30117 is not fixed", HPCC_30117.equalsIgnoreCase("fixed"));
149141
System.out.println("Creating file: '" + testfilename + "' on LandingZone: '" + targetLZ + "' on HPCC: '" + super.connString +"'");
150142
Assert.assertTrue(client.createHPCCFile(testfilename, targetLZ, true));
151143
}
152144

153145
@Test
154146
public void BwriteHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
155147
{
156-
assumeTrue("Ignoring test 'copyFile' because HPCC-30117 is not fixed", HPCC_30117.equalsIgnoreCase("fixed"));
157148
System.out.println("Writing data to file: '" + testfilename + "' on LandingZone: '" + targetLZ + "' on HPCC: '" + super.connString +"'");
158149
byte[] data = "HELLO MY DARLING, HELLO MY DEAR!1234567890ABCDEFGHIJKLMNOPQRSTUVXYZ".getBytes();
159150
Assert.assertTrue(client.writeHPCCFileData(data, testfilename, targetLZ, true, 0, 20));
@@ -163,7 +154,6 @@ public void BwriteHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
163154
public void CreadHPCCFile() throws Exception, ArrayOfEspExceptionWrapper
164155
{
165156
Assume.assumeFalse("Test not valid on containerized HPCC environment", client.isTargetHPCCContainerized());
166-
assumeTrue("Ignoring test 'copyFile' because HPCC-30117 is not fixed", HPCC_30117.equalsIgnoreCase("fixed"));
167157

168158
System.out.println("reading data from file: '" + testfilename + "' on LandingZone: '" + targetLZ + "' on HPCC: '" + super.connString +"'");
169159
byte[] data = "HELLO MY DARLING, HELLO MY DEAR!1234567890ABCDEFGHIJKLMNOPQRSTUVXYZ".getBytes();

wsclient/src/test/java/org/hpccsystems/ws/client/WsAttributesClientIntegrationTest_620.java

Lines changed: 0 additions & 48 deletions
This file was deleted.

wsclient/src/test/java/org/hpccsystems/ws/client/WsWorkunitsClientIntegration_54_Test.java

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)