Skip to content

Commit 497933e

Browse files
Fix certification profile to run tests in parallel and remove 14.1.1.0-11 references (#2501)
* fixing cert profile parallel run * remove annotation which is not needed and don't pull 14.1.1.0-11
1 parent 0076a9c commit 497933e

File tree

4 files changed

+2
-55
lines changed

4 files changed

+2
-55
lines changed

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItIntrospectVersion.java

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,6 @@
55

66
import java.io.File;
77
import java.io.FileOutputStream;
8-
import java.lang.annotation.ElementType;
9-
import java.lang.annotation.Retention;
10-
import java.lang.annotation.RetentionPolicy;
11-
import java.lang.annotation.Target;
128
import java.net.http.HttpResponse;
139
import java.nio.file.Files;
1410
import java.nio.file.Path;
@@ -61,10 +57,6 @@
6157
import org.junit.jupiter.api.Tag;
6258
import org.junit.jupiter.api.Test;
6359
import org.junit.jupiter.api.TestMethodOrder;
64-
import org.junit.jupiter.api.extension.ConditionEvaluationResult;
65-
import org.junit.jupiter.api.extension.ExecutionCondition;
66-
import org.junit.jupiter.api.extension.ExtendWith;
67-
import org.junit.jupiter.api.extension.ExtensionContext;
6860

6961
import static java.util.concurrent.TimeUnit.MINUTES;
7062
import static java.util.concurrent.TimeUnit.SECONDS;
@@ -78,10 +70,7 @@
7870
import static oracle.weblogic.kubernetes.TestConstants.KIND_REPO;
7971
import static oracle.weblogic.kubernetes.TestConstants.OKD;
8072
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
81-
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
8273
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TO_USE_IN_SPEC;
83-
import static oracle.weblogic.kubernetes.TestConstants.WLS_LATEST_IMAGE_TAG;
84-
import static oracle.weblogic.kubernetes.TestConstants.WLS_UPDATE_IMAGE_TAG;
8574
import static oracle.weblogic.kubernetes.actions.ActionConstants.APP_DIR;
8675
import static oracle.weblogic.kubernetes.actions.ActionConstants.ITTESTS_DIR;
8776
import static oracle.weblogic.kubernetes.actions.ActionConstants.RESOURCE_DIR;
@@ -972,10 +961,8 @@ void testCreateNewCluster() {
972961
* To: "image:container-registry.oracle.com/middleware/weblogic:2021-07-08-162571383699"
973962
* Verify all the pods are restarted and back to ready state
974963
* Verify the admin server is accessible and cluster members are healthy
975-
* This test will be skipped if the image tag is the latest WebLogic image tag
976964
*/
977965
@Order(5)
978-
@AssumeWebLogicImage
979966
@Test
980967
@DisplayName("Verify server pods are restarted by updating image name")
981968
void testUpdateImageName() {
@@ -1380,42 +1367,6 @@ public void tearDownAll() {
13801367
}
13811368
}
13821369

1383-
/**
1384-
* JUnit5 extension class to implement ExecutionCondition for the custom
1385-
* annotation @AssumeWebLogicImage.
1386-
*/
1387-
private static class WebLogicImageCondition implements ExecutionCondition {
1388-
1389-
/**
1390-
* Determine if the the test "testUpdateImageName" will be skipped based on WebLogic image tag.
1391-
* Skip the test if the image tag is the latest one.
1392-
*
1393-
* @param context the current extension context
1394-
* @return ConditionEvaluationResult disabled if the image tag is the latest one, enabled if the
1395-
* image tag is not the latest one
1396-
*/
1397-
@Override
1398-
public ConditionEvaluationResult evaluateExecutionCondition(ExtensionContext context) {
1399-
if (WEBLOGIC_IMAGE_TAG.equals(WLS_LATEST_IMAGE_TAG)) {
1400-
getLogger().info("WebLogic image tag is {0}. No latest image available to continue test. Skipping test",
1401-
WLS_LATEST_IMAGE_TAG);
1402-
return ConditionEvaluationResult
1403-
.disabled(String.format("No latest image available to continue test. Skipping test!"));
1404-
} else {
1405-
getLogger().info("Updating image to {0}. Continuing test!", WLS_UPDATE_IMAGE_TAG);
1406-
return ConditionEvaluationResult
1407-
.enabled(String.format("Updating image to {0}. Continuing test!", WLS_UPDATE_IMAGE_TAG));
1408-
}
1409-
}
1410-
}
1411-
1412-
@Target({ElementType.TYPE, ElementType.METHOD})
1413-
@Retention(RetentionPolicy.RUNTIME)
1414-
@Tag("assume-weblogic-image")
1415-
@ExtendWith(WebLogicImageCondition.class)
1416-
@interface AssumeWebLogicImage {
1417-
}
1418-
14191370
// copy samples directory to a temporary location
14201371
private static void setupSample() {
14211372
assertDoesNotThrow(() -> {

integration-tests/src/test/java/oracle/weblogic/kubernetes/TestConstants.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ public interface TestConstants {
9999
.orElse(BASE_IMAGES_REPO.equals(OCR_REGISTRY) ? OCR_WEBLOGIC_IMAGE_NAME : OCIR_WEBLOGIC_IMAGE_NAME);
100100
public static final String WEBLOGIC_IMAGE_TAG = Optional.ofNullable(System.getenv("WEBLOGIC_IMAGE_TAG"))
101101
.orElse(BASE_IMAGES_REPO.equals(OCR_REGISTRY) ? OCR_WEBLOGIC_IMAGE_TAG : OCIR_WEBLOGIC_IMAGE_TAG);
102-
public static final String WLS_UPDATE_IMAGE_TAG = "14.1.1.0-11";
103-
public static final String WLS_LATEST_IMAGE_TAG = "14.1.1.0-11";
104102

105103
// Get FMWINFRA_IMAGE_NAME/FMWINFRA_IMAGE_TAG from env var, if its not provided and
106104
// if base images repo is OCR use OCR default image values

integration-tests/src/test/java/oracle/weblogic/kubernetes/extensions/ImageBuilders.java

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@
6666
import static oracle.weblogic.kubernetes.TestConstants.WDT_BASIC_MODEL_PROPERTIES_FILE;
6767
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_NAME;
6868
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
69-
import static oracle.weblogic.kubernetes.TestConstants.WLS_UPDATE_IMAGE_TAG;
7069
import static oracle.weblogic.kubernetes.actions.ActionConstants.ARCHIVE_DIR;
7170
import static oracle.weblogic.kubernetes.actions.ActionConstants.DOWNLOAD_DIR;
7271
import static oracle.weblogic.kubernetes.actions.ActionConstants.MODEL_DIR;
@@ -180,7 +179,6 @@ public void beforeAll(ExtensionContext context) {
180179
Collection<String> images = new ArrayList<>();
181180

182181
images.add(WEBLOGIC_IMAGE_NAME + ":" + WEBLOGIC_IMAGE_TAG);
183-
images.add(WEBLOGIC_IMAGE_NAME + ":" + WLS_UPDATE_IMAGE_TAG);
184182
images.add(FMWINFRA_IMAGE_NAME + ":" + FMWINFRA_IMAGE_TAG);
185183
images.add(DB_IMAGE_NAME + ":" + DB_IMAGE_TAG);
186184

kindtest.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -302,8 +302,8 @@ rm -rf "${RESULT_ROOT:?}/*"
302302

303303
echo "Run tests..."
304304
if [ "${maven_profile_name}" = "wls-image-cert" ] || [ "${maven_profile_name}" = "fmw-image-cert" ] || [ "${maven_profile_name}" = "kind-sequential" ] || [ "${maven_profile_name}" = "kind-parallel" ]; then
305-
echo "Running mvn -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -pl integration-tests -P ${maven_profile_name} verify"
306-
time mvn -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log"
305+
echo "Running mvn -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -DPARALLEL_CLASSES=${parallel_run} -DNUMBER_OF_THREADS=${threads} -pl integration-tests -P ${maven_profile_name} verify"
306+
time mvn -Dwdt.download.url="${wdt_download_url}" -Dwit.download.url="${wit_download_url}" -Dwle.download.url="${wle_download_url}" -DPARALLEL_CLASSES="${parallel_run}" -DNUMBER_OF_THREADS="${threads}" -pl integration-tests -P ${maven_profile_name} verify 2>&1 | tee "${RESULT_ROOT}/kindtest.log"
307307
else
308308
if [ "${test_filter}" = "ItOperatorWlsUpgrade" ] || [ "${parallel_run}" = "false" ]; then
309309
echo "Running mvn -Dit.test=${test_filter}, !ItIstioCrossClusters, !ItOCILoadBalancer -Dwdt.download.url=${wdt_download_url} -Dwit.download.url=${wit_download_url} -Dwle.download.url=${wle_download_url} -pl integration-tests -P ${maven_profile_name} verify"

0 commit comments

Comments
 (0)