geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From genspr...@apache.org
Subject svn commit: r990156 [2/2] - in /geronimo/server/branches/2.2/testsuite: ./ cluster-testsuite/ cluster-testsuite/ejb-multicast/ cluster-testsuite/ejb-multicast/src/ cluster-testsuite/ejb-multicast/src/main/ cluster-testsuite/ejb-multicast/src/main/resou...
Date Fri, 27 Aug 2010 14:06:02 GMT
Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.class
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.class?rev=990156&view=auto
==============================================================================
Files geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.class
(added) and geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.class
Fri Aug 27 14:05:59 2010 differ

Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.class
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.class?rev=990156&view=auto
==============================================================================
Files geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.class
(added) and geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ear/bin/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.class
Fri Aug 27 14:05:59 2010 differ

Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java?rev=990156&view=auto
==============================================================================
--- geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
(added)
+++ geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/JMSTest.java
Fri Aug 27 14:05:59 2010
@@ -0,0 +1,53 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one
+ *  or more contributor license agreements.  See the NOTICE file
+ *  distributed with this work for additional information
+ *  regarding copyright ownership.  The ASF licenses this file
+ *  to you under the Apache License, Version 2.0 (the
+ *  "License"); you may not use this file except in compliance
+ *  with the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing,
+ *  software distributed under the License is distributed on an
+ *  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ *  KIND, either express or implied.  See the License for the
+ *  specific language governing permissions and limitations
+ *  under the License.
+ */
+
+package org.apache.geronimo.testsuite.enterprise.jms;
+
+import org.apache.geronimo.testsupport.SeleniumTestSupport;
+
+import org.testng.annotations.Test;
+
+/**
+ * ???
+ *
+ * @version $Rev$ $Date$
+ */
+@Test
+public class JMSTest
+extends SeleniumTestSupport {
+    @Test
+    public void testIndexContent() throws Exception {
+        selenium.open("/testjms/JMSQueueSender");
+        waitForPageLoad();
+        assertEquals("JMS Sender", selenium.getTitle());
+        assertEquals("Sent JMS Queue Message", selenium.getText("xpath=/html/body"));
+
+        selenium.open("/testjms/JMSQueueReceiver");
+        waitForPageLoad();
+        assertEquals("JMS Receiver", selenium.getTitle());
+        assertEquals("Received JMS Queue Message", selenium.getText("xpath=/html/body"));
+
+        selenium.open("/testjms/JMSTopicSenderReceiver");
+        waitForPageLoad();
+        assertEquals("JMS Topic Sender Receiver", selenium.getTitle());
+        assertEquals("Received JMS Topic Message", selenium.getText("xpath=/html/body"));
+
+    }
+}
+

Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java?rev=990156&view=auto
==============================================================================
--- geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
(added)
+++ geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/MessageSenderTest.java
Fri Aug 27 14:05:59 2010
@@ -0,0 +1,84 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.testsuite.enterprise.jms;
+
+import javax.naming.InitialContext;
+
+import org.apache.geronimo.jms.test.sb.JmsSenderRemote;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:tomasz[et]mazan[dot]pl">Tomasz Mazan</a>
+ */
+@Test
+public class MessageSenderTest {
+
+    /**
+     * Initialize test configuration
+     *
+     * @throws Exception if exception occurs
+     */
+    public void setUp() throws Exception {
+    }
+
+    /**
+     * Creates customer instance
+     *
+     * @throws Exception if exception occurs
+     */
+    @Test
+    public void sendRequests() throws Exception {
+        InitialContext ctx = new InitialContext();
+        String totalShipStr = System.getProperty("total-shipment");
+        String msgsPerShipStr = System.getProperty("requests-per-shipment");
+
+        int totalShip = (totalShipStr == null ? 10 : Integer.parseInt(totalShipStr));
+        int msgsPerShip = (msgsPerShipStr == null ? 20 : Integer.parseInt(msgsPerShipStr));
+
+        JmsSenderRemote jmsSender = (JmsSenderRemote) ctx.lookup("JmsSenderRemote");
+        if (jmsSender != null) {
+            System.out.println("JmsSender initialized");
+            for (int i = 0; i < totalShip; ++i) {
+                String messageName = (i + 1) + ".Request";
+
+                System.out.format("Sending (%1$s) request(s) with name %2$s%n", msgsPerShip,
messageName);
+                jmsSender.sendMessage(messageName, 0, msgsPerShip);
+                System.out.println("Requests sent");
+            }
+            //enable is receiveMessage is modified to detect messages on request queue
+/*
+            Thread.sleep(10000);
+            Integer id = jmsSender.receiveMessage();
+            if (id != null) {
+                throw new Exception("received request message: " + id);
+            }
+*/
+            //uncomment to actually run test
+            for (int i = 0; i < totalShip * msgsPerShip; i++) {
+                Integer id = jmsSender.receiveMessage();
+                if (id == null) {
+                    throw new Exception("did not receive message: " + i);
+//                    System.out.println("Did not receive message: " + i);
+//                    Thread.sleep(10000);
+                }
+            }
+        } else {
+            throw new Exception("Sender is null");
+        }
+    }
+
+}

Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java?rev=990156&view=auto
==============================================================================
--- geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java
(added)
+++ geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/java/org/apache/geronimo/testsuite/enterprise/jms/RollbackTest.java
Fri Aug 27 14:05:59 2010
@@ -0,0 +1,143 @@
+/**
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+package org.apache.geronimo.testsuite.enterprise.jms;
+
+import javax.naming.InitialContext;
+
+import org.apache.geronimo.jms.test.bmt.JmsBmtRemote;
+import org.testng.annotations.Test;
+
+/**
+ * @author <a href="mailto:tomasz[et]mazan[dot]pl">Tomasz Mazan</a>
+ */
+@Test
+public class RollbackTest {
+
+    /**
+     * Initialize test configuration
+     *
+     * @throws Exception if exception occurs
+     */
+    public void setUp() throws Exception {
+    }
+
+    /**
+     * Creates customer instance
+     *
+     * @throws Exception if exception occurs
+     */
+//    @Test
+    public void XXtestRollbackQUeueAndTopic() throws Exception {
+        InitialContext ctx = new InitialContext();
+        String totalShipStr = System.getProperty("total-shipment");
+        String msgsPerShipStr = System.getProperty("requests-per-shipment");
+
+        int totalShip = (totalShipStr == null ? 10 : Integer.parseInt(totalShipStr));
+        int msgsPerShip = (msgsPerShipStr == null ? 20 : Integer.parseInt(msgsPerShipStr));
+
+        JmsBmtRemote jmsSender = (JmsBmtRemote) ctx.lookup("JmsBmtRemote");
+        boolean pass = true;
+        if (jmsSender != null) {
+            System.out.println("JmsBmtRemote initialized");
+            for (int i = 0; i < totalShip; ++i) {
+                String messageName = (i + 1) + ".Request";
+
+                System.out.format("Sending (%1$s) request(s) with name %2$s%n", msgsPerShip,
messageName);
+                String result = jmsSender.sendMessageQueue(messageName, 0, msgsPerShip);
+                System.out.println("QUeue equests sent, result: " + result);
+                if ("FAIL".equals(result)) pass = false;
+                result = jmsSender.sendMessageTopic(messageName, 0, msgsPerShip);
+                System.out.println("Topic requests sent, result: " + result);
+                if ("FAIL".equals(result)) pass = false;
+            }
+            if (!pass) {
+                throw new Exception("Failed, see out and logs");
+            }
+        } else {
+            throw new Exception("Sender is null");
+        }
+    }
+
+    /**
+     * Creates customer instance
+     *
+     * @throws Exception if exception occurs
+     */
+    @Test
+    public void testRollbackQueue() throws Exception {
+        InitialContext ctx = new InitialContext();
+        String totalShipStr = System.getProperty("total-shipment");
+        String msgsPerShipStr = System.getProperty("requests-per-shipment");
+
+        int totalShip = (totalShipStr == null ? 10 : Integer.parseInt(totalShipStr));
+        int msgsPerShip = (msgsPerShipStr == null ? 20 : Integer.parseInt(msgsPerShipStr));
+
+        JmsBmtRemote jmsSender = (JmsBmtRemote) ctx.lookup("JmsBmtRemote");
+        boolean pass = true;
+        if (jmsSender != null) {
+            System.out.println("JmsBmtRemote initialized");
+            for (int i = 0; i < totalShip; ++i) {
+                String messageName = (i + 1) + ".Request";
+
+                System.out.format("Sending (%1$s) request(s) with name %2$s%n", msgsPerShip,
messageName);
+                String result = jmsSender.sendMessageQueue(messageName, 0, msgsPerShip);
+                System.out.println("QUeue equests sent, result: " + result);
+                if ("FAIL".equals(result)) pass = false;
+            }
+            if (!pass) {
+                throw new Exception("Failed, see out and logs");
+            }
+        } else {
+            throw new Exception("Sender is null");
+        }
+    }
+
+    /**
+     * Creates customer instance
+     *
+     * @throws Exception if exception occurs
+     */
+    @Test
+    public void testRollbackTopic() throws Exception {
+        InitialContext ctx = new InitialContext();
+        String totalShipStr = System.getProperty("total-shipment");
+        String msgsPerShipStr = System.getProperty("requests-per-shipment");
+
+        int totalShip = (totalShipStr == null ? 10 : Integer.parseInt(totalShipStr));
+        int msgsPerShip = (msgsPerShipStr == null ? 20 : Integer.parseInt(msgsPerShipStr));
+
+        JmsBmtRemote jmsSender = (JmsBmtRemote) ctx.lookup("JmsBmtRemote");
+        boolean pass = true;
+        if (jmsSender != null) {
+            System.out.println("JmsBmtRemote initialized");
+            for (int i = 0; i < totalShip; ++i) {
+                String messageName = (i + 1) + ".Request";
+
+                System.out.format("Sending (%1$s) request(s) with name %2$s%n", msgsPerShip,
messageName);
+                String result = jmsSender.sendMessageTopic(messageName, 0, msgsPerShip);
+                System.out.println("Topic requests sent, result: " + result);
+                if ("FAIL".equals(result)) pass = false;
+            }
+            if (!pass) {
+                throw new Exception("Failed, see out and logs");
+            }
+        } else {
+            throw new Exception("Sender is null");
+        }
+    }
+
+}
\ No newline at end of file

Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/jndi.properties
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/jndi.properties?rev=990156&view=auto
==============================================================================
--- geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/jndi.properties
(added)
+++ geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/jndi.properties
Fri Aug 27 14:05:59 2010
@@ -0,0 +1,17 @@
+#  Licensed to the Apache Software Foundation (ASF) under one or more
+#  contributor license agreements.  See the NOTICE file distributed with
+#  this work for additional information regarding copyright ownership.
+#  The ASF licenses this file to You under the Apache License, Version 2.0
+#  (the "License"); you may not use this file except in compliance with
+#  the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+#  Unless required by applicable law or agreed to in writing, software
+#  distributed under the License is distributed on an "AS IS" BASIS,
+#  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#  See the License for the specific language governing permissions and
+#  limitations under the License.
+
+java.naming.factory.initial=org.apache.openejb.client.RemoteInitialContextFactory
+java.naming.provider.url=ejbd://localhost:4201
\ No newline at end of file

Added: geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/testng.xml?rev=990156&view=auto
==============================================================================
--- geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/testng.xml
(added)
+++ geronimo/server/branches/2.2/testsuite/enterprise-testsuite/jms-tests/jms-ejb/src/test/resources/testng.xml
Fri Aug 27 14:05:59 2010
@@ -0,0 +1,35 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements.  See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership.  The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License.  You may obtain a copy of the License at
+    
+     http://www.apache.org/licenses/LICENSE-2.0
+    
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!-- $Rev$ $Date$ -->
+
+<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd">
+
+<suite name="Suite1" verbose="1">
+    <test name="enterprise-testsuite.jms">
+        <packages>
+            <package name="org.apache.geronimo.testsuite.enterprise.jms"/>
+        </packages>
+        <!-- reverse what is commented out to just run the GERONIMO-4784 failing test
-->
+        <!--<classes>-->
+            <!--<class name="org.apache.geronimo.testsuite.enterprise.jms.RollbackTest"/>-->
+        <!--</classes>-->
+    </test>
+</suite>

Modified: geronimo/server/branches/2.2/testsuite/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.2/testsuite/pom.xml?rev=990156&r1=990155&r2=990156&view=diff
==============================================================================
--- geronimo/server/branches/2.2/testsuite/pom.xml (original)
+++ geronimo/server/branches/2.2/testsuite/pom.xml Fri Aug 27 14:05:59 2010
@@ -95,6 +95,7 @@
         <module>security-testsuite</module>
         <module>web-testsuite</module>
         <module>webservices-testsuite</module>
+        <module>cluster-testsuite</module>
     </modules>
 
     <build>



Mime
View raw message