Skip to content

Commit 260253a

Browse files
authored
Merge pull request #25378 from joe-chacko/fix-cos-naming-fats
Fix cos naming fats
2 parents 8733411 + d706e6e commit 260253a

File tree

73 files changed

+1062
-3808
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+1062
-3808
lines changed

dev/com.ibm.ws.transport.iiop.open_fat/bnd.bnd

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ tested.features: \
3535
com.ibm.ws.transport.iiop;version=latest,\
3636
com.ibm.websphere.javaee.ejb.3.1;version=latest,\
3737
com.ibm.websphere.javaee.servlet.3.1;version=latest,\
38+
com.ibm.websphere.javaee.annotation.1.3;version=latest,\
3839
com.ibm.ws.org.osgi.annotation.versioning;version=latest,\
3940
io.openliberty.org.apache.bcel;version=latest,\
4041
fattest.simplicity;version=latest

dev/com.ibm.ws.transport.iiop.open_fat/build.gradle

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,17 +27,12 @@ task copyBundles {
2727
enabled project.file('test-bundles').exists()
2828
doLast {
2929
new File(project.buildDir, 'buildfiles').eachLine { String line ->
30-
if (!line.contains(project.name + '.jar')) {
31-
copy {
32-
from line
33-
into new File(autoFvtDir, 'publish/bundles')
34-
}
30+
if (!line.contains(project.name + '.jar')) copy {
31+
from line
32+
into new File(autoFvtDir, 'publish/bundles')
3533
}
3634
}
3735
}
3836
}
3937

40-
addRequiredLibraries {
41-
dependsOn copyBundles
42-
dependsOn addDerby
43-
}
38+
addRequiredLibraries { dependsOn copyBundles }

dev/com.ibm.ws.transport.iiop.open_fat/fat/src/com/ibm/ws/transport/iiop/AbstractCosNamingFatTest.java

Lines changed: 0 additions & 119 deletions
This file was deleted.

dev/com.ibm.ws.transport.iiop.open_fat/fat/src/com/ibm/ws/transport/iiop/CosNamingViaORBInitRefFatTest.java

Lines changed: 0 additions & 33 deletions
This file was deleted.
Lines changed: 30 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*******************************************************************************
2-
* Copyright (c) 2015-2023 IBM Corporation and others.
1+
/*
2+
* Copyright (c) 2015,2023 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
@@ -9,31 +9,45 @@
99
*
1010
* Contributors:
1111
* IBM Corporation - initial API and implementation
12-
*******************************************************************************/
12+
*/
1313
package com.ibm.ws.transport.iiop;
1414

15+
import static com.ibm.websphere.simplicity.ShrinkHelper.exportDropinAppToServer;
16+
import static com.ibm.ws.transport.iiop.FATSuite.TEST_CORBA_REMOTE_WAR;
17+
1518
import org.junit.AfterClass;
1619
import org.junit.BeforeClass;
1720
import org.junit.Test;
21+
import org.junit.runner.RunWith;
22+
23+
import componenttest.annotation.Server;
24+
import componenttest.annotation.TestServlet;
25+
import componenttest.custom.junit.runner.FATRunner;
26+
import componenttest.topology.impl.LibertyServer;
27+
import componenttest.topology.utils.FATServletClient;
28+
import test.corba.remote.war.CosNamingClientStringToObjectServlet;
29+
import test.iiop.common.NamingUtil;
1830

19-
import componenttest.annotation.MaximumJavaLevel;
31+
@RunWith(FATRunner.class)
32+
public class CosNamingViaStringToObjectFatTest extends FATServletClient {
33+
@Server("basketball")
34+
public static LibertyServer iiopServer;
2035

21-
public class CosNamingViaStringToObjectFatTest extends AbstractCosNamingFatTest {
36+
@Server("bandyball")
37+
@TestServlet(servlet = CosNamingClientStringToObjectServlet.class, contextRoot = "test.corba.remote")
38+
public static LibertyServer iiopClient;
2239

2340
@BeforeClass
24-
public static void setup() throws Exception {
25-
setupUsingStringToObject();
41+
public static void startServers() throws Exception {
42+
exportDropinAppToServer(iiopClient, TEST_CORBA_REMOTE_WAR);
43+
iiopClient.startServer();
44+
iiopServer.startServer();
45+
iiopServer.waitForStringInLog(NamingUtil.CNC_LOG_MSG);
2646
}
2747

2848
@AfterClass
29-
public static void teardown() {
30-
destroyORB();
31-
}
32-
33-
@Test
34-
@MaximumJavaLevel(javaLevel = 8)
35-
@Override
36-
public void testNameServiceListing() throws Exception {
37-
super.testNameServiceListing();
49+
public static void stopServers() throws Exception {
50+
iiopClient.stopServer();
51+
iiopServer.stopServer();
3852
}
3953
}

dev/com.ibm.ws.transport.iiop.open_fat/fat/src/com/ibm/ws/transport/iiop/FATSuite.java

Lines changed: 28 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*******************************************************************************
2-
* Copyright (c) 2020-2023 IBM Corporation and others.
1+
/*
2+
* Copyright (c) 2020,2023 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
@@ -9,7 +9,7 @@
99
*
1010
* Contributors:
1111
* IBM Corporation - initial API and implementation
12-
*******************************************************************************/
12+
*/
1313
package com.ibm.ws.transport.iiop;
1414

1515
import static componenttest.topology.impl.LibertyServerFactory.getLibertyServer;
@@ -36,24 +36,21 @@
3636

3737
@RunWith(Suite.class)
3838
@SuiteClasses({
39-
IORTest.class,
40-
IIOPSimpleFatTest.class,
41-
CosNamingViaStringToObjectFatTest.class,
42-
CosNamingViaORBInitRefFatTest.class,
43-
IIOPClientEJBTest.class, //TODO: Check if this really is working
44-
IIOPClientServletTest.class,
45-
InterceptorFatTest.class
39+
CosNamingViaStringToObjectFatTest.class,
40+
IIOPClientEJBTest.class,
41+
IIOPClientServletTest.class,
42+
IORTest.class,
4643
})
4744
public class FATSuite {
48-
4945
private static final JavaArchive INTERFACES_JAR;
5046
private static final JavaArchive TEST_CORBA_BEAN_JAR;
51-
private static final EnterpriseArchive TEST_CORBA_EAR;
52-
private static final WebArchive TEST_CORBA_WEB_WAR;
47+
static final EnterpriseArchive TEST_CORBA_EAR;
48+
static final WebArchive TEST_CORBA_WEB_WAR;
49+
static final WebArchive TEST_CORBA_REMOTE_WAR;
5350

5451
static {
5552
try {
56-
INTERFACES_JAR = ShrinkHelper.buildJavaArchive("interfaces.jar", "shared");
53+
INTERFACES_JAR = ShrinkHelper.buildJavaArchive("interfaces.jar", "shared", "test.iiop.common");
5754
System.out.println(INTERFACES_JAR);
5855

5956
TEST_CORBA_BEAN_JAR = ShrinkHelper.buildJavaArchive("test.corba.bean.jar", "test.corba.bean.jar");
@@ -68,6 +65,10 @@ public class FATSuite {
6865
TEST_CORBA_WEB_WAR = ShrinkHelper.buildDefaultApp("test.corba.web.war", "test.corba.web.war");
6966
TEST_CORBA_WEB_WAR.addAsLibrary(INTERFACES_JAR);
7067
ShrinkHelper.addDirectory(TEST_CORBA_WEB_WAR, "test-applications/test.corba.web.war.resources");
68+
69+
TEST_CORBA_REMOTE_WAR = ShrinkHelper.buildDefaultApp("test.corba.remote.war", "test.corba.remote.war");
70+
TEST_CORBA_REMOTE_WAR.addAsLibrary(INTERFACES_JAR);
71+
ShrinkHelper.addDirectory(TEST_CORBA_REMOTE_WAR, "test-applications/test.corba.remote.war.resources");
7172
} catch (Exception e) {
7273
throw (AssertionFailedError)new AssertionFailedError("Could not assemble test applications").initCause(e);
7374
}
@@ -77,21 +78,23 @@ public class FATSuite {
7778

7879
@BeforeClass
7980
public static void installTestFeatures() throws Exception {
80-
//The server used does not matter, it can be any to install the features
81-
LibertyServer server = getLibertyServer("buckyball");
82-
server.installSystemBundle("test.user.feature");
83-
server.installSystemFeature("test.user.feature-1.0");
84-
server.installSystemBundle("test.iiop");
85-
server.installSystemFeature("test.iiop-1.0");
81+
// Use ANY server to install bundles and features
82+
LibertyServer server = getLibertyServer("bandyball");
83+
server.installSystemBundle("test.user.feature");
84+
server.installSystemFeature("test.user.feature-1.0");
85+
server.installSystemBundle("test.iiop");
86+
server.installSystemFeature("test.iiop-1.0");
87+
server.installSystemFeature("test.iiop.client-1.0");
8688
}
8789

8890
@AfterClass
8991
public static void uninstallTestFeatures() throws Exception {
90-
LibertyServer server = getLibertyServer("buckyball");
91-
server.uninstallSystemBundle("test.user.feature");
92-
server.uninstallSystemFeature("test.user.feature-1.0");
93-
server.uninstallSystemBundle("test.iiop");
94-
server.uninstallSystemFeature("test.iiop-1.0");
92+
LibertyServer server = getLibertyServer("buckyball");
93+
server.uninstallSystemBundle("test.user.feature");
94+
server.uninstallSystemFeature("test.user.feature-1.0");
95+
server.uninstallSystemBundle("test.iiop");
96+
server.uninstallSystemFeature("test.iiop-1.0");
97+
server.uninstallSystemFeature("test.iiop.client-1.0");
9598
}
9699

97100
}

dev/com.ibm.ws.transport.iiop.open_fat/fat/src/com/ibm/ws/transport/iiop/IIOPClientEJBTest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
/*******************************************************************************
2-
* Copyright (c) 2015-2023 IBM Corporation and others.
1+
/*
2+
* Copyright (c) 2015,2023 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
@@ -9,7 +9,7 @@
99
*
1010
* Contributors:
1111
* IBM Corporation - initial API and implementation
12-
*******************************************************************************/
12+
*/
1313
package com.ibm.ws.transport.iiop;
1414

1515
import org.jboss.shrinkwrap.api.Archive;
@@ -24,13 +24,13 @@
2424
import componenttest.custom.junit.runner.FATRunner;
2525
import componenttest.topology.impl.LibertyServer;
2626
import componenttest.topology.utils.FATServletClient;
27-
import test.corba.web.war.MyDelegatingIIOPClientServlet;
27+
import test.corba.web.war.IIOPDelegatingServlet;
2828

2929
@RunWith(FATRunner.class)
3030
public class IIOPClientEJBTest extends FATServletClient {
31-
@Server("buckyball")
32-
@TestServlet(servlet = MyDelegatingIIOPClientServlet.class, contextRoot = "test.corba.web")
33-
public static LibertyServer server;
31+
@Server("buckyball")
32+
@TestServlet(servlet = IIOPDelegatingServlet.class, contextRoot = "test.corba.web")
33+
public static LibertyServer server;
3434

3535
@BeforeClass
3636
public static void beforeClass() throws Exception {
@@ -40,6 +40,6 @@ public static void beforeClass() throws Exception {
4040

4141
@AfterClass
4242
public static void afterClass() throws Exception {
43-
server.stopServer();
43+
server.stopServer();
4444
}
4545
}

0 commit comments

Comments
 (0)