Skip to content

Commit

Permalink
Merge pull request #29689 from tkburroughs/FixConfigUpdatesInRarBeanV…
Browse files Browse the repository at this point in the history
…alFAT2

Fix config updates in RAR BeanVal FAT
  • Loading branch information
tkburroughs authored Sep 22, 2024
2 parents 6fa16df + 67bdb69 commit 8b15acb
Showing 1 changed file with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2019, 2023 IBM Corporation and others.
* Copyright (c) 2019, 2024 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -65,6 +65,7 @@ public abstract class RarBeanValidationTestCommon extends FATServletClient {
protected static LibertyServer server;
private String rarDisplayName = null;
private String appName = null;
private String appName2 = null;
protected static final String cfgFileExtn = "_server.xml";
protected static ServerConfiguration originalServerConfig;

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

if (appName != null) {
//Make sure the application stops, otherwise we may try to start it again in the next test and get:
//E CWWKZ0013E: It is not possible to start two applications called <appName>
//We are assuming each test only uses one application.
server.waitForConfigUpdateInLogUsingMark(null, "CWWKZ0009I.*" + appName);
// Make sure the application stops, otherwise we may try to start it again in the next test and get:
// E CWWKZ0013E: It is not possible to start two applications called <appName>
// Most tests only uses one application; support a few with 2 applications
if (appName2 != null) {
server.waitForConfigUpdateInLogUsingMark(null, "CWWKZ0009I.*" + appName, "CWWKZ0009I.*" + appName2);
} else {
server.waitForConfigUpdateInLogUsingMark(null, "CWWKZ0009I.*" + appName);
}
appName = null;
appName2 = null;
} else {
server.waitForConfigUpdateInLogUsingMark(null);
}
Expand Down Expand Up @@ -772,9 +778,11 @@ public void testJavaBeanValidationSuccessStandaloneAS() throws Exception {
server.setMarkToEndOfLog();
rarDisplayName = RarTests.adapter_jca16_jbv_ActivationSpecValidation_Success;
appName = RarTests.sampleapp_jca16_jbv_standaloneassuccessApp;
appName2 = RarTests.Jbvapp;
server.setServerConfigurationFile(testName + cfgFileExtn);
Set<String> appNames = new HashSet<String>();
appNames.add(appName);
appNames.add(appName2);
server.waitForConfigUpdateInLogUsingMark(appNames);

assertNotNull("The Resource adapter with name " + rarDisplayName + " is not started",
Expand Down Expand Up @@ -812,9 +820,11 @@ public void testJavaBeanValidationFailureStandaloneAS() throws Exception {
server.setMarkToEndOfLog();
rarDisplayName = RarTests.adapter_jca16_jbv_ActivationSpecValidation_Failure;
appName = RarTests.sampleapp_jca16_jbv_standaloneasfailureApp;
appName2 = RarTests.Jbvapp;
server.setServerConfigurationFile(testName + cfgFileExtn);
Set<String> appNames = new HashSet<String>();
appNames.add(appName);
appNames.add(appName2);
server.waitForConfigUpdateInLogUsingMark(appNames);

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

0 comments on commit 8b15acb

Please sign in to comment.