Skip to content

Commit

Permalink
rename client files with IT suffix and other changes.
Browse files Browse the repository at this point in the history
Signed-off-by: Gurunandan Rao <[email protected]>
  • Loading branch information
gurunrao committed Aug 1, 2023
1 parent d5f9a1b commit c9f7ac2
Show file tree
Hide file tree
Showing 110 changed files with 709 additions and 535 deletions.
15 changes: 9 additions & 6 deletions glassfish-runner/jms-tck/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@
<admin.pass.file>/tmp/ripassword</admin.pass.file>
<admin.pass.file.encoded>${admin.pass.file}.encoded</admin.pass.file.encoded>
<jndi.fs.dir>/tmp/ri_admin_objects</jndi.fs.dir>
<jndi.factory.initial>&quot;java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory&quot;</jndi.factory.initial>
<jndi.provider.url>&quot;java.naming.provider.url=file:///${jndi.fs.dir}&quot;</jndi.provider.url>
<jndi.factory.initial>java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory</jndi.factory.initial>
<jndi.provider.url>java.naming.provider.url=file:///${jndi.fs.dir}</jndi.provider.url>
<ri.home>${project.build.directory}/${glassfish.toplevel.dir}/mq</ri.home>
<exec.asadmin>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/bin/asadmin</exec.asadmin>
<exec.imqusermgr>${ri.home}/bin/imqusermgr</exec.imqusermgr>
Expand Down Expand Up @@ -528,14 +528,17 @@
</goals>
<configuration>
<excludes>
<exclude>**/p/**</exclude>
<exclude>**/ee*/**</exclude>
</excludes>
<additionalClasspathElements>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jakarta.jms-api.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/jms-core.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/glassfish/modules/glassfish-corba-omgapi.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derbyclient.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/javadb/lib/derby.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/mq/lib/imq.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/mq/lib/jms.jar</additionalClasspathElement>
<additionalClasspathElement>${project.build.directory}/${glassfish.toplevel.dir}/mq/lib/fscontext.jar</additionalClasspathElement>
</additionalClasspathElements>
<dependenciesToScan>jakartatck:jms-tck</dependenciesToScan>
<systemPropertyVariables>
Expand All @@ -546,9 +549,9 @@
<authpassword>javajoe</authpassword>
<jms_timeout>10000</jms_timeout>
<platform.mode>standalone</platform.mode>
<jndi.fs.dir>/tmp/ri_admin_objects</jndi.fs.dir>
<jndi.factory.initial>java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory</jndi.factory.initial>
<jndi.provider.url>java.naming.provider.url=file:///tmp/ri_admin_objects</jndi.provider.url>
<webServerHost>localhost</webServerHost>
<webServerPort>8080</webServerPort>
<vehicle>standalone</vehicle>
</systemPropertyVariables>
<environmentVariables>
<GLASSFISH_HOME>${project.build.directory}/${glassfish.toplevel.dir}</GLASSFISH_HOME>
Expand Down
28 changes: 28 additions & 0 deletions glassfish-runner/jms-tck/src/test/resources/jndi.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#
# Copyright (c) 2013, 2018 Oracle and/or its affiliates. All rights reserved.
#
# This program and the accompanying materials are made available under the
# terms of the Eclipse Public License v. 2.0, which is available at
# http://www.eclipse.org/legal/epl-2.0.
#
# This Source Code may also be made available under the following Secondary
# Licenses when the conditions for such availability set forth in the
# Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
# version 2 with the GNU Classpath Exception, which is available at
# https://www.gnu.org/software/classpath/license.html.
#
# SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
#

# Properties for establishing initial JNDI Context. These properties
# are automatically read by JNDI during new InitialContext() as long
# as this file is in the search path. For JMS TCK the Open Message
# Queue uses the JNDI FileSystem Context Provider.
#
# If on a WINDOWS based system then the path below will need to contain
# the drive letter in the path. The path below is for UNIX based systems.
# So for WINDOWS platforms the (java.naming.provider.url) MUST BE:
# java.naming.provider.url=file:///C:/tmp/ri_admin_objects
#
java.naming.factory.initial=com.sun.jndi.fscontext.RefFSContextFactory
java.naming.provider.url=file:///tmp/ri_admin_objects
2 changes: 1 addition & 1 deletion glassfish-runner/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<properties>
<glassfish-artifact-id>glassfish</glassfish-artifact-id>

<glassfish.container.version>7.0.0-M10</glassfish.container.version>
<glassfish.container.version>7.0.0</glassfish.container.version>
<glassfish.toplevel.dir>glassfish7</glassfish.toplevel.dir>
<jakarta.rest.version>3.1.0</jakarta.rest.version>
<json.tck.version>2.1.0</json.tck.version>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,149 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* This Source Code may also be made available under the following Secondary
* Licenses when the conditions for such availability set forth in the
* Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
* version 2 with the GNU Classpath Exception, which is available at
* https://www.gnu.org/software/classpath/license.html.
*
* SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0
*/

package com.sun.ts.lib.implementation.sun.jms;

import java.util.*;
import java.io.*;
import javax.naming.*;
import jakarta.jms.*;
import com.sun.ts.lib.util.*;
import com.sun.ts.lib.porting.*;

/**
* This is an implementation of the TSJMSObjectsInterface. An implementation of
* this class must be supplied by any JMS implementation wishing to get JMS
* adminsitered objects: ConnectionFactories, queues and topics.
*
* @author Dianne Jiao
*/

public class SunRIJMSObjects implements TSJMSObjectsInterface {
private static Context jndiContext = null;

private static QueueConnectionFactory qcf = null;

private static TopicConnectionFactory tcf = null;

private static ConnectionFactory cf = null;

private jakarta.jms.Topic testTopic = null;

private jakarta.jms.Queue testQueue = null;

private void getJNDIContext() throws Exception {

if (jndiContext == null) {
try {
TestUtil.logTrace("Getting initial context");
jndiContext = new InitialContext();
} catch (javax.naming.NamingException ne) {
TestUtil.logErr("Could not create JNDI context because: ", ne);
TestUtil.printStackTrace(ne);
throw ne;
}
}
}

/**
* This method allows individual implementation to get the Queue
*/

public jakarta.jms.Queue getQueue(String name) throws Exception {
getJNDIContext();

try {
testQueue = (jakarta.jms.Queue) jndiContext.lookup(name);
} catch (Exception e) {
TestUtil.logErr("Failed to lookup Queue");
TestUtil.printStackTrace(e);
throw e;
}
return testQueue;
}

/**
* This method allows individual implementation to get the Topic
*/

public Topic getTopic(String name) throws Exception {
getJNDIContext();

try {
testTopic = (Topic) jndiContext.lookup(name);
} catch (Exception e) {
TestUtil.logErr("Failed to lookup Topic");
TestUtil.printStackTrace(e);
throw e;
}
return testTopic;
}

/**
* This method allows individual implementation to get the
* QueueConnectionFactory
*/

public QueueConnectionFactory getQueueConnectionFactory(String name)
throws Exception {
getJNDIContext();

try {
qcf = (QueueConnectionFactory) jndiContext.lookup(name);
} catch (Exception e) {
TestUtil.logErr("Failed to lookup QueueConnectionFactory");
TestUtil.printStackTrace(e);
throw e;
}
return qcf;
}

/**
* This method allows individual implementation to get the
* TopicConnectionFactory
*/

public TopicConnectionFactory getTopicConnectionFactory(String name)
throws Exception {
getJNDIContext();

try {
tcf = (TopicConnectionFactory) jndiContext.lookup(name);
} catch (Exception e) {
TestUtil.logErr("Failed to lookup TopicConnectionFactory");
TestUtil.printStackTrace(e);
throw e;
}
return tcf;
}

/**
* This method allows individual implementation to get the ConnectionFactory
*/

public ConnectionFactory getConnectionFactory(String name) throws Exception {
getJNDIContext();

try {
cf = (ConnectionFactory) jndiContext.lookup(name);
} catch (Exception e) {
TestUtil.logErr("Failed to lookup ConnectionFactory");
TestUtil.printStackTrace(e);
throw e;
}
return cf;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@
/**
* JMS TS tests. Testing method calls on closed QueueConnection objects.
*/
public class ClosedQueueConnectionTests {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedQueueConnection.ClosedQueueConnectionTests";
public class ClosedQueueConnectionTestsIT {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedQueueConnection.ClosedQueueConnectionTestsIT";

private static final String testDir = System.getProperty("user.dir");

private static final long serialVersionUID = 1L;

private static final Logger logger = (Logger) System.getLogger(ClosedQueueConnectionTests.class.getName());
private static final Logger logger = (Logger) System.getLogger(ClosedQueueConnectionTestsIT.class.getName());

// JMS objects
private transient JmsTool tool = null;
Expand Down Expand Up @@ -120,13 +120,13 @@ public void setup() throws Exception {
throw new Exception("'timeout' (milliseconds) must be > 0");
}
if (user == null) {
throw new Exception("'users' must be null");
throw new Exception("'users' is null");
}
if (password == null) {
throw new Exception("'password' must be null");
throw new Exception("'password' is null");
}
if (mode == null) {
throw new Exception("'mode' must be null");
throw new Exception("'mode' is null");
}
queues = new ArrayList(2);
// get ready for new test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
import jakarta.jms.Message;
import jakarta.jms.MessageListener;

public class ClosedQueueReceiverTests {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedQueueReceiver.ClosedQueueReceiverTests";
public class ClosedQueueReceiverIT {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedQueueReceiver.ClosedQueueReceiverTestsIT";

private static final String testDir = System.getProperty("user.dir");

private static final Logger logger = (Logger) System.getLogger(ClosedQueueReceiverTests.class.getName());
private static final Logger logger = (Logger) System.getLogger(ClosedQueueReceiverIT.class.getName());

// JMS objects
private static JmsTool tool = null;
Expand Down Expand Up @@ -118,13 +118,13 @@ public void setup() throws Exception {
throw new Exception("'timeout' (milliseconds) must be > 0");
}
if (user == null) {
throw new Exception("'user' must be null");
throw new Exception("'user' is null");
}
if (password == null) {
throw new Exception("'password' must be null");
throw new Exception("'password' is null");
}
if (mode == null) {
throw new Exception("'mode' must be null");
throw new Exception("'mode' is null");
}
queues = new ArrayList(2);
// get ready for new test
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2007, 2020 Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2007, 2023 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0, which is available at
Expand Down Expand Up @@ -36,12 +36,12 @@
/**
* JMS TS tests. Testing method calls on closed QueueSession objects.
*/
public class ClosedQueueSessionTests {
public class ClosedQueueSessionTestsIT {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedQueueSession.ClosedQueueSessionTests";

private static final String testDir = System.getProperty("user.dir");

private static final Logger logger = (Logger) System.getLogger(ClosedQueueSessionTests.class.getName());
private static final Logger logger = (Logger) System.getLogger(ClosedQueueSessionTestsIT.class.getName());

// JMS objects
private static JmsTool tool = null;
Expand Down Expand Up @@ -124,13 +124,13 @@ public void setup() throws Exception {
throw new Exception("'timeout' (milliseconds) must be > 0");
}
if (user == null) {
throw new Exception("'user' must be null");
throw new Exception("'user' is null");
}
if (password == null) {
throw new Exception("'password' must be null");
throw new Exception("'password' is null");
}
if (mode == null) {
throw new Exception("'mode' must be null");
throw new Exception("'mode' is null");
}
queues = new ArrayList(2);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
/**
* JMS product tests. Testing method calls on closed TopicConnection objects.
*/
public class ClosedTopicConnectionTests {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedTopicConnection.ClosedTopicConnectionTests";
public class ClosedTopicConnectionTestsIT {
private static final String TestName = "com.sun.ts.tests.jms.core.appclient.closedTopicConnection.ClosedTopicConnectionTestsIT";

private static final String testDir = System.getProperty("user.dir");

private static final Logger logger = (Logger) System.getLogger(ClosedTopicConnectionTests.class.getName());
private static final Logger logger = (Logger) System.getLogger(ClosedTopicConnectionTestsIT.class.getName());

// JMS objects
private static JmsTool tool = null;
Expand Down Expand Up @@ -111,13 +111,13 @@ public void setup() throws Exception {
throw new Exception("'timeout' (milliseconds) must be > 0");
}
if (user == null) {
throw new Exception("'user' must be null");
throw new Exception("'user' is null");
}
if (password == null) {
throw new Exception("'numProducers' must be null");
throw new Exception("'numProducers' is null");
}
if (mode == null) {
throw new Exception("'mode' must be null");
throw new Exception("'mode' is null");
}

// get ready for new test
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@
import jakarta.jms.Message;
import jakarta.jms.MessageListener;

public class ClosedTopicSessionTests {
private static final String testName = "com.sun.ts.tests.jms.ee.ejbjspservlet.closedTopicSession.ClosedTopicSessionTests";
public class ClosedTopicSessionTestsIT {
private static final String testName = "com.sun.ts.tests.jms.ee.ejbjspservlet.closedTopicSession.ClosedTopicSessionTestsIT";

private static final String testDir = System.getProperty("user.dir");

private static final Logger logger = (Logger) System.getLogger(ClosedTopicSessionTests.class.getName());
private static final Logger logger = (Logger) System.getLogger(ClosedTopicSessionTestsIT.class.getName());

// Harness req's
private Properties props = null;
Expand Down
Loading

0 comments on commit c9f7ac2

Please sign in to comment.