Skip to content

Commit 8b15acb

Browse files
authored
Merge pull request #29689 from tkburroughs/FixConfigUpdatesInRarBeanValFAT2
Fix config updates in RAR BeanVal FAT
2 parents 6fa16df + 67bdb69 commit 8b15acb

File tree

1 file changed

+15
-5
lines changed

1 file changed

+15
-5
lines changed

dev/com.ibm.ws.jca_fat_regr.rar.beanVal/fat/src/suite/r80/base/jca16/jbv/RarBeanValidationTestCommon.java

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*******************************************************************************
2-
* Copyright (c) 2019, 2023 IBM Corporation and others.
2+
* Copyright (c) 2019, 2024 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 2.0
55
* which accompanies this distribution, and is available at
@@ -65,6 +65,7 @@ public abstract class RarBeanValidationTestCommon extends FATServletClient {
6565
protected static LibertyServer server;
6666
private String rarDisplayName = null;
6767
private String appName = null;
68+
private String appName2 = null;
6869
protected static final String cfgFileExtn = "_server.xml";
6970
protected static ServerConfiguration originalServerConfig;
7071

@@ -473,11 +474,16 @@ public void cleanUpPerTest() throws Exception {
473474
server.updateServerConfiguration(originalServerConfig);
474475

475476
if (appName != null) {
476-
//Make sure the application stops, otherwise we may try to start it again in the next test and get:
477-
//E CWWKZ0013E: It is not possible to start two applications called <appName>
478-
//We are assuming each test only uses one application.
479-
server.waitForConfigUpdateInLogUsingMark(null, "CWWKZ0009I.*" + appName);
477+
// Make sure the application stops, otherwise we may try to start it again in the next test and get:
478+
// E CWWKZ0013E: It is not possible to start two applications called <appName>
479+
// Most tests only uses one application; support a few with 2 applications
480+
if (appName2 != null) {
481+
server.waitForConfigUpdateInLogUsingMark(null, "CWWKZ0009I.*" + appName, "CWWKZ0009I.*" + appName2);
482+
} else {
483+
server.waitForConfigUpdateInLogUsingMark(null, "CWWKZ0009I.*" + appName);
484+
}
480485
appName = null;
486+
appName2 = null;
481487
} else {
482488
server.waitForConfigUpdateInLogUsingMark(null);
483489
}
@@ -772,9 +778,11 @@ public void testJavaBeanValidationSuccessStandaloneAS() throws Exception {
772778
server.setMarkToEndOfLog();
773779
rarDisplayName = RarTests.adapter_jca16_jbv_ActivationSpecValidation_Success;
774780
appName = RarTests.sampleapp_jca16_jbv_standaloneassuccessApp;
781+
appName2 = RarTests.Jbvapp;
775782
server.setServerConfigurationFile(testName + cfgFileExtn);
776783
Set<String> appNames = new HashSet<String>();
777784
appNames.add(appName);
785+
appNames.add(appName2);
778786
server.waitForConfigUpdateInLogUsingMark(appNames);
779787

780788
assertNotNull("The Resource adapter with name " + rarDisplayName + " is not started",
@@ -812,9 +820,11 @@ public void testJavaBeanValidationFailureStandaloneAS() throws Exception {
812820
server.setMarkToEndOfLog();
813821
rarDisplayName = RarTests.adapter_jca16_jbv_ActivationSpecValidation_Failure;
814822
appName = RarTests.sampleapp_jca16_jbv_standaloneasfailureApp;
823+
appName2 = RarTests.Jbvapp;
815824
server.setServerConfigurationFile(testName + cfgFileExtn);
816825
Set<String> appNames = new HashSet<String>();
817826
appNames.add(appName);
827+
appNames.add(appName2);
818828
server.waitForConfigUpdateInLogUsingMark(appNames);
819829

820830
assertNotNull("The Resource adapter with name " + rarDisplayName + " is not started",

0 commit comments

Comments
 (0)