Skip to content

Commit 764863a

Browse files
authored
Merge pull request #21459 from dazey3/enableJPAFATLite_v2_integration
Enable JPA FAT for LITE testing v2
2 parents b5ef937 + 67d2bf9 commit 764863a

File tree

57 files changed

+467
-408
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+467
-408
lines changed

dev/com.ibm.ws.jpa.tests.beanvalidation_fat.common/fat/src/com/ibm/ws/jpa/tests/beanvalidation/tests/BeanValidation20_Web.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@
4545
import componenttest.topology.utils.PrivHelper;
4646

4747
@RunWith(FATRunner.class)
48-
@Mode(TestMode.FULL)
48+
@Mode(TestMode.LITE)
4949
public class BeanValidation20_Web extends JPAFATServletClient {
5050

5151
@Rule

dev/com.ibm.ws.jpa.tests.beanvalidation_fat.common/fat/src/com/ibm/ws/jpa/tests/beanvalidation/tests/BeanValidation_Web.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -45,7 +45,7 @@
4545
import componenttest.topology.utils.PrivHelper;
4646

4747
@RunWith(FATRunner.class)
48-
@Mode(TestMode.FULL)
48+
@Mode(TestMode.LITE)
4949
public class BeanValidation_Web extends JPAFATServletClient {
5050

5151
@Rule

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.0_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA20.java

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -16,12 +16,9 @@
1616
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1717

1818
import componenttest.common.apiservices.Bootstrap;
19-
import componenttest.rules.repeater.RepeatTestAction;
19+
import componenttest.rules.repeater.EE6FeatureReplacementAction;
2020

21-
/**
22-
*
23-
*/
24-
public class RepeatWithJPA20 implements RepeatTestAction {
21+
public class RepeatWithJPA20 extends EE6FeatureReplacementAction {
2522
public static final String ID = "JPA20";
2623

2724
@Override
@@ -30,7 +27,7 @@ public boolean isEnabled() {
3027
Bootstrap b = Bootstrap.getInstance();
3128
String installRoot = b.getValue("libertyInstallPath");
3229
File jpa20Feature = new File(installRoot + "/lib/features/com.ibm.websphere.appserver.jpa-2.0.mf");
33-
return jpa20Feature.exists();
30+
return jpa20Feature.exists() && super.isEnabled();
3431
} catch (Exception e) {
3532
return false;
3633
}

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.1_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA21.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -13,17 +13,18 @@
1313

1414
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1515

16-
import componenttest.rules.repeater.RepeatTestAction;
16+
import componenttest.custom.junit.runner.Mode.TestMode;
17+
import componenttest.rules.repeater.EE7FeatureReplacementAction;
1718

18-
/**
19-
*
20-
*/
21-
public class RepeatWithJPA21 implements RepeatTestAction {
19+
public class RepeatWithJPA21 extends EE7FeatureReplacementAction {
2220
public static final String ID = "JPA21";
2321

24-
@Override
25-
public boolean isEnabled() {
26-
return true;
22+
/**
23+
* Allow the default repeat action to run on LITE mode
24+
*/
25+
public RepeatWithJPA21() {
26+
// Used in componenttest.rules.repeater.RepeatTestAction.isEnabled() to determine if the test should run
27+
withTestMode(TestMode.LITE);
2728
}
2829

2930
@Override

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.1_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA21Hibernate.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -13,17 +13,18 @@
1313

1414
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1515

16-
import componenttest.rules.repeater.RepeatTestAction;
16+
import componenttest.custom.junit.runner.Mode.TestMode;
17+
import componenttest.rules.repeater.EE7FeatureReplacementAction;
1718

18-
/**
19-
*
20-
*/
21-
public class RepeatWithJPA21Hibernate implements RepeatTestAction {
19+
public class RepeatWithJPA21Hibernate extends EE7FeatureReplacementAction {
2220
public static final String ID = "JPA21_HIBERNATE";
2321

24-
@Override
25-
public boolean isEnabled() {
26-
return true;
22+
/**
23+
* Restrict Hibernate tests to run on FULL mode
24+
*/
25+
public RepeatWithJPA21Hibernate() {
26+
// Used in componenttest.rules.repeater.RepeatTestAction.isEnabled() to determine if the test should run
27+
withTestMode(TestMode.FULL);
2728
}
2829

2930
@Override

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.1_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA21OpenJPA.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -13,17 +13,18 @@
1313

1414
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1515

16-
import componenttest.rules.repeater.RepeatTestAction;
16+
import componenttest.custom.junit.runner.Mode.TestMode;
17+
import componenttest.rules.repeater.EE7FeatureReplacementAction;
1718

18-
/**
19-
*
20-
*/
21-
public class RepeatWithJPA21OpenJPA implements RepeatTestAction {
19+
public class RepeatWithJPA21OpenJPA extends EE7FeatureReplacementAction {
2220
public static final String ID = "JPA21_OPENJPA";
2321

24-
@Override
25-
public boolean isEnabled() {
26-
return true;
22+
/**
23+
* Restrict OpenJPA tests to run on FULL mode
24+
*/
25+
public RepeatWithJPA21OpenJPA() {
26+
// Used in componenttest.rules.repeater.RepeatTestAction.isEnabled() to determine if the test should run
27+
withTestMode(TestMode.FULL);
2728
}
2829

2930
@Override

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.2_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA22.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -13,17 +13,18 @@
1313

1414
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1515

16-
import componenttest.rules.repeater.RepeatTestAction;
16+
import componenttest.custom.junit.runner.Mode.TestMode;
17+
import componenttest.rules.repeater.EE8FeatureReplacementAction;
1718

18-
/**
19-
*
20-
*/
21-
public class RepeatWithJPA22 implements RepeatTestAction {
19+
public class RepeatWithJPA22 extends EE8FeatureReplacementAction {
2220
public static final String ID = "JPA22";
2321

24-
@Override
25-
public boolean isEnabled() {
26-
return true;
22+
/**
23+
* Allow the default repeat action to run on LITE mode
24+
*/
25+
public RepeatWithJPA22() {
26+
// Used in componenttest.rules.repeater.RepeatTestAction.isEnabled() to determine if the test should run
27+
withTestMode(TestMode.LITE);
2728
}
2829

2930
@Override

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.2_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA22Hibernate.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -13,17 +13,18 @@
1313

1414
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1515

16-
import componenttest.rules.repeater.RepeatTestAction;
16+
import componenttest.custom.junit.runner.Mode.TestMode;
17+
import componenttest.rules.repeater.EE8FeatureReplacementAction;
1718

18-
/**
19-
*
20-
*/
21-
public class RepeatWithJPA22Hibernate implements RepeatTestAction {
19+
public class RepeatWithJPA22Hibernate extends EE8FeatureReplacementAction {
2220
public static final String ID = "JPA22_HIBERNATE";
2321

24-
@Override
25-
public boolean isEnabled() {
26-
return true;
22+
/**
23+
* Restrict Hibernate tests to run on FULL mode
24+
*/
25+
public RepeatWithJPA22Hibernate() {
26+
// Used in componenttest.rules.repeater.RepeatTestAction.isEnabled() to determine if the test should run
27+
withTestMode(TestMode.FULL);
2728
}
2829

2930
@Override

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_2.2_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/RepeatWithJPA22OpenJPA.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2021 IBM Corporation and others.
2+
* Copyright (c) 2022 IBM Corporation and others.
33
* All rights reserved. This program and the accompanying materials
44
* are made available under the terms of the Eclipse Public License v1.0
55
* which accompanies this distribution, and is available at
@@ -13,17 +13,18 @@
1313

1414
import com.ibm.ws.testtooling.jpaprovider.JPAPersistenceProvider;
1515

16-
import componenttest.rules.repeater.RepeatTestAction;
16+
import componenttest.custom.junit.runner.Mode.TestMode;
17+
import componenttest.rules.repeater.EE8FeatureReplacementAction;
1718

18-
/**
19-
*
20-
*/
21-
public class RepeatWithJPA22OpenJPA implements RepeatTestAction {
19+
public class RepeatWithJPA22OpenJPA extends EE8FeatureReplacementAction {
2220
public static final String ID = "JPA22_OPENJPA";
2321

24-
@Override
25-
public boolean isEnabled() {
26-
return true;
22+
/**
23+
* Restrict OpenJPA tests to run on FULL mode
24+
*/
25+
public RepeatWithJPA22OpenJPA() {
26+
// Used in componenttest.rules.repeater.RepeatTestAction.isEnabled() to determine if the test should run
27+
withTestMode(TestMode.FULL);
2728
}
2829

2930
@Override

dev/com.ibm.ws.jpa.tests.beanvalidation_jpa_3.0_fat/fat/src/com/ibm/ws/jpa/tests/beanvalidation/FATSuite.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,6 @@ public class FATSuite extends AbstractFATSuite {
3737
@ClassRule
3838
public static RepeatTests r = RepeatTests
3939
.with(new RepeatWithJPA30())
40-
.with(new RepeatWithJPA30Hibernate());
40+
.andWith(new RepeatWithJPA30Hibernate());
4141

4242
}

0 commit comments

Comments
 (0)