Skip to content

Commit 18e22d5

Browse files
committed
Merge branch 'parallel-1412' into 'release/4.2'
Parallel nightly test failure fixes See merge request weblogic-cloud/weblogic-kubernetes-operator!4915
2 parents b406da8 + 0dad180 commit 18e22d5

13 files changed

+42
-28
lines changed

Jenkinsfile.podman

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ pipeline {
170170
)
171171
string(name: 'DB_IMAGE_TAG',
172172
description: 'Oracle DB image tag',
173-
defaultValue: '12.2.0.1-slim'
173+
defaultValue: '19.3.0.0'
174174
)
175175
string(name: 'MONITORING_EXPORTER_BRANCH',
176176
description: '',

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

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
import javax.annotation.Nonnull;
1414

1515
import io.kubernetes.client.custom.V1Patch;
16+
import io.kubernetes.client.openapi.ApiException;
1617
import io.kubernetes.client.openapi.models.V1EnvVar;
1718
import io.kubernetes.client.openapi.models.V1LocalObjectReference;
1819
import io.kubernetes.client.openapi.models.V1ObjectMeta;
@@ -29,7 +30,6 @@
2930
import oracle.weblogic.domain.Model;
3031
import oracle.weblogic.domain.ServerPod;
3132
import oracle.weblogic.domain.ServerService;
32-
import oracle.weblogic.kubernetes.actions.impl.primitive.Kubernetes;
3333
import oracle.weblogic.kubernetes.annotations.IntegrationTest;
3434
import oracle.weblogic.kubernetes.annotations.Namespaces;
3535
import oracle.weblogic.kubernetes.logging.LoggingFacade;
@@ -48,7 +48,6 @@
4848
import static oracle.weblogic.kubernetes.TestConstants.BASE_IMAGES_REPO;
4949
import static oracle.weblogic.kubernetes.TestConstants.BASE_IMAGES_REPO_SECRET_NAME;
5050
import static oracle.weblogic.kubernetes.TestConstants.CLUSTER_VERSION;
51-
import static oracle.weblogic.kubernetes.TestConstants.DB_IMAGE_TO_USE_IN_SPEC;
5251
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_API_VERSION;
5352
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_STATUS_CONDITION_AVAILABLE_TYPE;
5453
import static oracle.weblogic.kubernetes.TestConstants.DOMAIN_STATUS_CONDITION_COMPLETED_TYPE;
@@ -84,8 +83,10 @@
8483
import static oracle.weblogic.kubernetes.utils.ConfigMapUtils.configMapExist;
8584
import static oracle.weblogic.kubernetes.utils.ConfigMapUtils.createConfigMapAndVerify;
8685
import static oracle.weblogic.kubernetes.utils.ConfigMapUtils.createConfigMapFromFiles;
86+
import static oracle.weblogic.kubernetes.utils.DbUtils.createOracleDBUsingOperator;
8787
import static oracle.weblogic.kubernetes.utils.DbUtils.createRcuAccessSecret;
88-
import static oracle.weblogic.kubernetes.utils.DbUtils.setupDBandRCUschema;
88+
import static oracle.weblogic.kubernetes.utils.DbUtils.createRcuSchema;
89+
import static oracle.weblogic.kubernetes.utils.DbUtils.deleteOracleDB;
8990
import static oracle.weblogic.kubernetes.utils.DomainUtils.checkDomainStatusConditionTypeExists;
9091
import static oracle.weblogic.kubernetes.utils.DomainUtils.checkDomainStatusConditionTypeHasExpectedStatus;
9192
import static oracle.weblogic.kubernetes.utils.DomainUtils.checkServerStatusPodPhaseAndPodReady;
@@ -734,24 +735,21 @@ void testMSBootFailureStatus() {
734735

735736
String rcuaccessSecretName = domainName + "-rcu-access";
736737
String opsswalletpassSecretName = domainName + "-opss-wallet-password-secret";
738+
String rcuSysPassword = "Oradoc_db1";
739+
String dbName = domainName + "my-oracle-db";
737740

738-
logger.info("Start DB and create RCU schema for namespace: {0}, dbListenerPort: {1}, RCU prefix: {2}, "
739-
+ "dbUrl: {3}, dbImage: {4}, fmwImage: {5} ", domainNamespace, dbListenerPort, rcuSchemaPrefix, dbUrl,
740-
DB_IMAGE_TO_USE_IN_SPEC, FMWINFRA_IMAGE_TO_USE_IN_SPEC);
741-
assertDoesNotThrow(() -> setupDBandRCUschema(DB_IMAGE_TO_USE_IN_SPEC, FMWINFRA_IMAGE_TO_USE_IN_SPEC,
742-
rcuSchemaPrefix, domainNamespace, getNextFreePort(), dbUrl, dbListenerPort),
743-
String.format("Failed to create RCU schema for prefix %s in the namespace %s with "
744-
+ "dbUrl %s, dbListenerPost %s", rcuSchemaPrefix, domainNamespace, dbUrl, dbListenerPort));
741+
logger.info("Create Oracle DB in namespace: {0} ", domainNamespace);
742+
createBaseRepoSecret(domainNamespace);
743+
dbUrl = assertDoesNotThrow(() -> createOracleDBUsingOperator(dbName, rcuSysPassword, domainNamespace));
744+
745+
logger.info("Create RCU schema with fmwImage: {0}, rcuSchemaPrefix: {1}, dbUrl: {2}, "
746+
+ " dbNamespace: {3}", FMWINFRA_IMAGE_TO_USE_IN_SPEC, rcuSchemaPrefix, dbUrl, domainNamespace);
747+
createRcuSchema(FMWINFRA_IMAGE_TO_USE_IN_SPEC, rcuSchemaPrefix, dbUrl, domainNamespace);
745748

746749
// create RCU access secret
747750
logger.info("Creating RCU access secret: {0}, with prefix: {1}, dbUrl: {2}, schemapassword: {3})",
748751
rcuaccessSecretName, rcuSchemaPrefix, rcuSchemaPassword, dbUrl);
749-
assertDoesNotThrow(() -> createRcuAccessSecret(rcuaccessSecretName,
750-
domainNamespace,
751-
rcuSchemaPrefix,
752-
rcuSchemaPassword,
753-
dbUrl),
754-
String.format("createSecret failed for %s", rcuaccessSecretName));
752+
createRcuAccessSecret(rcuaccessSecretName, domainNamespace, rcuSchemaPrefix, rcuSchemaPassword, dbUrl);
755753

756754
logger.info("Create OPSS wallet password secret");
757755
assertDoesNotThrow(() -> createOpsswalletpasswordSecret(
@@ -823,12 +821,7 @@ rcuSchemaPrefix, domainNamespace, getNextFreePort(), dbUrl, dbListenerPort),
823821
}
824822

825823
// delete Oracle database
826-
String dbPodName = "oracledb";
827-
assertDoesNotThrow(() -> Kubernetes.deleteDeployment(domainNamespace, "oracledb"),
828-
"deleting oracle db failed");
829-
830-
logger.info("Wait for the oracle Db pod: {0} to be deleted in namespace {1}", dbPodName, domainNamespace);
831-
PodUtils.checkPodDeleted(dbPodName, null, domainNamespace);
824+
deleteOracleDB(domainNamespace, dbName);
832825

833826
patchStr
834827
= "[{\"op\": \"replace\", \"path\": \"/spec/serverStartPolicy\", \"value\": \"IfNeeded\"}]";
@@ -848,6 +841,8 @@ rcuSchemaPrefix, domainNamespace, getNextFreePort(), dbUrl, dbListenerPort),
848841
checkServerStatusPodPhaseAndPodReady(domainName, domainNamespace, managedServerName, "Running", "False");
849842
}
850843
testPassed = true;
844+
} catch (ApiException ex) {
845+
logger.severe(ex.getLocalizedMessage());
851846
} finally {
852847
if (!testPassed) {
853848
LoggingUtil.generateLog(this, ns);

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -539,6 +539,7 @@ private int enableIstio(String clusterName, String domainUid, String namespace,
539539
templateMap.put("DUID", domainUid);
540540
templateMap.put("ADMIN_SERVICE", adminServerPodName);
541541
templateMap.put("CLUSTER_SERVICE", clusterService);
542+
templateMap.put("MANAGED_SERVER_PORT", "7001");
542543

543544
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
544545
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,7 @@ void testIstioDomainHomeInImage() throws UnknownHostException {
183183
templateMap.put("DUID", domainUid);
184184
templateMap.put("ADMIN_SERVICE",adminServerPodName);
185185
templateMap.put("CLUSTER_SERVICE", clusterService);
186+
templateMap.put("MANAGED_SERVER_PORT", "8001");
186187

187188
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
188189
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -319,6 +319,7 @@ void testIstioDomainHomeInPv() throws UnknownHostException {
319319
templateMap.put("DUID", domainUid);
320320
templateMap.put("ADMIN_SERVICE",adminServerPodName);
321321
templateMap.put("CLUSTER_SERVICE", clusterService);
322+
templateMap.put("MANAGED_SERVER_PORT", "8001");
322323

323324
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
324325
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@ void testIstioModelInImageDomain() throws UnknownHostException, IOException, Int
215215
templateMap.put("DUID", domainUid);
216216
templateMap.put("ADMIN_SERVICE", adminServerPodName);
217217
templateMap.put("CLUSTER_SERVICE", clusterService);
218+
templateMap.put("MANAGED_SERVER_PORT", "7001");
218219

219220
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
220221
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ private void setupIstioModelInImageDomain(String miiImage, String domainNamespac
379379
templateMap.put("DUID", domainUid);
380380
templateMap.put("ADMIN_SERVICE",adminServerPodName);
381381
templateMap.put("CLUSTER_SERVICE", clusterService);
382+
templateMap.put("MANAGED_SERVER_PORT", "7001");
382383

383384
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
384385
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,7 @@ void testIstioTwoDomainsWithSingleIngress() throws UnknownHostException {
233233
templateMap.put("DUID", domainUid1);
234234
templateMap.put("ADMIN_SERVICE",adminServerPodName1);
235235
templateMap.put("CLUSTER_SERVICE", clusterService1);
236+
templateMap.put("MANAGED_SERVER_PORT", "8001");
236237

237238
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
238239
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
import oracle.weblogic.kubernetes.utils.ExecCommand;
3131
import oracle.weblogic.kubernetes.utils.ExecResult;
3232
import org.junit.jupiter.api.BeforeAll;
33+
import org.junit.jupiter.api.Disabled;
3334
import org.junit.jupiter.api.DisplayName;
3435
import org.junit.jupiter.api.Tag;
3536
import org.junit.jupiter.api.Test;
@@ -108,6 +109,7 @@
108109
@Tag("oke-sequential")
109110

110111
@IntegrationTest
112+
@Disabled
111113
class ItLiftAndShiftFromOnPremDomain {
112114
private static String traefikNamespace = null;
113115
private static String domainNamespace = null;

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

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
import static oracle.weblogic.kubernetes.TestConstants.MII_BASIC_IMAGE_TAG;
2424
import static oracle.weblogic.kubernetes.TestConstants.RESULTS_ROOT;
2525
import static oracle.weblogic.kubernetes.TestConstants.TEST_IMAGES_REPO_SECRET_NAME;
26+
import static oracle.weblogic.kubernetes.TestConstants.WEBLOGIC_IMAGE_TAG;
2627
import static oracle.weblogic.kubernetes.actions.ActionConstants.MODEL_DIR;
2728
import static oracle.weblogic.kubernetes.actions.ActionConstants.RESOURCE_DIR;
2829
import static oracle.weblogic.kubernetes.actions.TestActions.scaleAllClustersInDomain;
@@ -217,12 +218,18 @@ private void runClientOnAdminPod() {
217218
StringBuffer extOpts = new StringBuffer("");
218219
extOpts.append("-Dweblogic.security.SSL.ignoreHostnameVerification=true ");
219220
extOpts.append("-Dweblogic.security.SSL.trustedCAKeyStore=/shared/"
220-
+ domainNamespace + "/" + domainUid + "/TrustKeyStore.jks ");
221+
+ domainNamespace + "/" + domainUid + "/TrustKeyStore.jks ");
221222
extOpts.append("-Dweblogic.security.SSL.trustedCAKeyStorePassPhrase=changeit ");
223+
String managedServerPort;
224+
if (WEBLOGIC_IMAGE_TAG.contains("12")) {
225+
managedServerPort = "8100";
226+
} else {
227+
managedServerPort = "7002";
228+
}
222229
testUntil(
223230
runClientInsidePod(adminServerPodName, domainNamespace,
224-
"/u01", extOpts.toString() + " SslTestClient", "t3s://"
225-
+ domainUid + "-cluster-cluster-1:8100"),
231+
"/u01", extOpts.toString() + " SslTestClient", "t3s://"
232+
+ domainUid + "-cluster-cluster-1:" + managedServerPort),
226233
logger,
227234
"Wait for client to get Initial context");
228235
}

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ void testIstioModelInImageDomain() {
227227
templateMap.put("ADMIN_SERVICE",adminServerPodName);
228228
templateMap.put("CLUSTER_SERVICE", clusterService);
229229
templateMap.put("testwebapp", "sample-war");
230+
templateMap.put("MANAGED_SERVER_PORT", "7001");
230231

231232
Path srcHttpFile = Paths.get(RESOURCE_DIR, "istio", "istio-http-template.yaml");
232233
Path targetHttpFile = assertDoesNotThrow(

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,8 @@ private static void createDomainCrAndVerify(String adminSecretName,
293293
.runtimeEncryptionSecret(encryptionSecretName))
294294
.introspectorJobActiveDeadlineSeconds(3000L)));
295295
setPodAntiAffinity(domain);
296+
297+
logger.info(Yaml.dump(domain));
296298

297299
ClusterSpec clusterSpec = new ClusterSpec()
298300
.withClusterName(clusterName)
@@ -303,6 +305,7 @@ private static void createDomainCrAndVerify(String adminSecretName,
303305
ClusterResource cluster =
304306
createClusterResource(clusterName, domainNamespace, clusterSpec);
305307
logger.info("Creating cluster resource {0} in namespace {1}", clusterName, domainNamespace);
308+
logger.info(Yaml.dump(cluster));
306309
createClusterAndVerify(cluster);
307310
// set cluster references
308311
domain.getSpec().withCluster(new V1LocalObjectReference().name(clusterName));

integration-tests/src/test/resources/istio/istio-http-template.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,9 @@ spec:
4747
prefix: /myear
4848
- uri:
4949
prefix: /testwebapp
50-
- port: 7001
50+
- port: MANAGED_SERVER_PORT
5151
route:
5252
- destination:
5353
host: CLUSTER_SERVICE
5454
port:
55-
number: 7001
55+
number: MANAGED_SERVER_PORT

0 commit comments

Comments
 (0)