|
1 | 1 | /******************************************************************************* |
2 | | - * Copyright (c) 2019, 2023 IBM Corporation and others. |
| 2 | + * Copyright (c) 2019, 2024 IBM Corporation and others. |
3 | 3 | * All rights reserved. This program and the accompanying materials |
4 | 4 | * are made available under the terms of the Eclipse Public License 2.0 |
5 | 5 | * which accompanies this distribution, and is available at |
@@ -65,6 +65,7 @@ public abstract class RarBeanValidationTestCommon extends FATServletClient { |
65 | 65 | protected static LibertyServer server; |
66 | 66 | private String rarDisplayName = null; |
67 | 67 | private String appName = null; |
| 68 | + private String appName2 = null; |
68 | 69 | protected static final String cfgFileExtn = "_server.xml"; |
69 | 70 | protected static ServerConfiguration originalServerConfig; |
70 | 71 |
|
@@ -473,11 +474,16 @@ public void cleanUpPerTest() throws Exception { |
473 | 474 | server.updateServerConfiguration(originalServerConfig); |
474 | 475 |
|
475 | 476 | 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 | + } |
480 | 485 | appName = null; |
| 486 | + appName2 = null; |
481 | 487 | } else { |
482 | 488 | server.waitForConfigUpdateInLogUsingMark(null); |
483 | 489 | } |
@@ -772,9 +778,11 @@ public void testJavaBeanValidationSuccessStandaloneAS() throws Exception { |
772 | 778 | server.setMarkToEndOfLog(); |
773 | 779 | rarDisplayName = RarTests.adapter_jca16_jbv_ActivationSpecValidation_Success; |
774 | 780 | appName = RarTests.sampleapp_jca16_jbv_standaloneassuccessApp; |
| 781 | + appName2 = RarTests.Jbvapp; |
775 | 782 | server.setServerConfigurationFile(testName + cfgFileExtn); |
776 | 783 | Set<String> appNames = new HashSet<String>(); |
777 | 784 | appNames.add(appName); |
| 785 | + appNames.add(appName2); |
778 | 786 | server.waitForConfigUpdateInLogUsingMark(appNames); |
779 | 787 |
|
780 | 788 | assertNotNull("The Resource adapter with name " + rarDisplayName + " is not started", |
@@ -812,9 +820,11 @@ public void testJavaBeanValidationFailureStandaloneAS() throws Exception { |
812 | 820 | server.setMarkToEndOfLog(); |
813 | 821 | rarDisplayName = RarTests.adapter_jca16_jbv_ActivationSpecValidation_Failure; |
814 | 822 | appName = RarTests.sampleapp_jca16_jbv_standaloneasfailureApp; |
| 823 | + appName2 = RarTests.Jbvapp; |
815 | 824 | server.setServerConfigurationFile(testName + cfgFileExtn); |
816 | 825 | Set<String> appNames = new HashSet<String>(); |
817 | 826 | appNames.add(appName); |
| 827 | + appNames.add(appName2); |
818 | 828 | server.waitForConfigUpdateInLogUsingMark(appNames); |
819 | 829 |
|
820 | 830 | assertNotNull("The Resource adapter with name " + rarDisplayName + " is not started", |
|
0 commit comments