You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scm@geronimo.apache.org by ga...@apache.org on 2010/09/17 20:19:24 UTC

svn commit: r998234 - in /geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test: ./ src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/EJBBeans/ src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/Servlets/ src/test/resources/

Author: gawor
Date: Fri Sep 17 18:19:24 2010
New Revision: 998234

URL: http://svn.apache.org/viewvc?rev=998234&view=rev
Log:
configure the test properly and formatting updates

Added:
    geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/
    geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml   (with props)
Modified:
    geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/pom.xml
    geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/EJBBeans/CalculatorSingleBean.java
    geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/Servlets/CalculatorServlet.java

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/pom.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/pom.xml?rev=998234&r1=998233&r2=998234&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/pom.xml (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/pom.xml Fri Sep 17 18:19:24 2010
@@ -17,11 +17,8 @@
     specific language governing permissions and limitations
     under the License.
 -->
-
 <!-- $Rev$ $Date$ -->
-
 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
-
     <modelVersion>4.0.0</modelVersion>
 
     <parent>
@@ -40,73 +37,66 @@
             <artifactId>geronimo-servlet_3.0_spec</artifactId>
             <scope>provided</scope>
         </dependency>
-		<dependency>
-			<groupId>org.apache.geronimo.specs</groupId>
-			<artifactId>geronimo-ejb_3.1_spec</artifactId>
-			<version>1.0</version>
-		</dependency>
-		<dependency>
-            <groupId>org.apache.servicemix.bundles</groupId>
-            <artifactId>org.apache.servicemix.bundles.commons-httpclient</artifactId>
-			<version>3.1_4</version>
+        <dependency>
+            <groupId>org.apache.geronimo.specs</groupId>
+            <artifactId>geronimo-ejb_3.1_spec</artifactId>
+            <scope>provided</scope>
         </dependency>
     </dependencies>
 
-<profiles>
-    <profile>
-        <id>it</id>
-        <activation>
-            <property>
-                <name>it</name>
-            </property>
-        </activation>
-    <build>        
-        <plugins>	
-            <plugin>
-				<groupId>org.codehaus.mojo</groupId>
-				<artifactId>selenium-maven-plugin</artifactId>
-		    </plugin>	
-		    <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-failsafe-plugin</artifactId>
-                <!--<configuration>
-                    <suiteXmlFiles>
-                        <suiteXmlFile>
-							${project.build.testOutputDirectory}/testng.xml
-						</suiteXmlFile>
-                    </suiteXmlFiles>
-                </configuration>-->
-            </plugin>
-            <plugin>
-                <groupId>org.apache.geronimo.buildsupport</groupId>
-                <artifactId>geronimo-maven-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <id>deploy-wars</id>
-                        <phase>pre-integration-test</phase>
-                        <goals>
-                            <goal>deploy-module</goal>
-                        </goals>
-                        <configuration>
-                            <moduleArchive>${project.build.directory}/${project.artifactId}-${project.version}.war</moduleArchive>
-                        </configuration>
-                    </execution>
-
-                    <execution>
-                        <id>undeploy-war-as-moduleId</id>
-                        <phase>post-integration-test</phase>
-                        <goals>
-                            <goal>undeploy-module</goal>
-                        </goals>
+    <profiles>
+        <profile>
+            <id>it</id>
+            <activation>
+                <property>
+                    <name>it</name>
+                </property>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>selenium-maven-plugin</artifactId>
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.maven.plugins</groupId>
+                        <artifactId>maven-failsafe-plugin</artifactId>
                         <configuration>
-                            <moduleId>${project.groupId}/${project.artifactId}/${project.version}/car</moduleId>
+                            <suiteXmlFiles>
+                                <suiteXmlFile>
+                                    ${project.build.testOutputDirectory}/testng.xml
+                                </suiteXmlFile>
+                            </suiteXmlFiles>
                         </configuration>
-                    </execution>
-                </executions>
-            </plugin>
-        </plugins>
-    </build>
-    </profile>
-</profiles>
-	
+                    </plugin>
+                    <plugin>
+                        <groupId>org.apache.geronimo.buildsupport</groupId>
+                        <artifactId>geronimo-maven-plugin</artifactId>
+                        <executions>
+                            <execution>
+                                <id>deploy-wars</id>
+                                <phase>pre-integration-test</phase>
+                                <goals>
+                                    <goal>deploy-module</goal>
+                                </goals>
+                                <configuration>
+                                    <moduleArchive>${project.build.directory}/${project.artifactId}-${project.version}.war</moduleArchive>
+                                </configuration>
+                            </execution>
+                            <execution>
+                                <id>undeploy-war-as-moduleId</id>
+                                <phase>post-integration-test</phase>
+                                <goals>
+                                    <goal>undeploy-module</goal>
+                                </goals>
+                                <configuration>
+                                    <moduleId>${project.groupId}/${project.artifactId}/${project.version}/car</moduleId>
+                                </configuration>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
 </project>

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/EJBBeans/CalculatorSingleBean.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/EJBBeans/CalculatorSingleBean.java?rev=998234&r1=998233&r2=998234&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/EJBBeans/CalculatorSingleBean.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/EJBBeans/CalculatorSingleBean.java Fri Sep 17 18:19:24 2010
@@ -20,6 +20,7 @@ package org.apache.geronimo.testsuite.ja
 
 import javax.ejb.Singleton;
 import java.text.DecimalFormat;
+
 @Singleton
 public class CalculatorSingleBean {
     String output = "Start the calculator process:<br/>";

Modified: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/Servlets/CalculatorServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/Servlets/CalculatorServlet.java?rev=998234&r1=998233&r2=998234&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/Servlets/CalculatorServlet.java (original)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/main/java/org/apache/geronimo/testsuite/javaee6/ejbtest/Servlets/CalculatorServlet.java Fri Sep 17 18:19:24 2010
@@ -30,62 +30,53 @@ import javax.ejb.EJB;
 import org.apache.geronimo.testsuite.javaee6.ejbtest.EJBBeans.CalculatorSingleBean;
 import java.text.DecimalFormat;
 
-
-
 public class CalculatorServlet extends HttpServlet {
     // the ejb container will route every request to the same Singleton EJB.
     @EJB
     private CalculatorSingleBean calcAdd;
     @EJB
     private CalculatorSingleBean calcSub;
-    private String output= new String();
-  protected void processRequest(HttpServletRequest req, HttpServletResponse response)
-  throws ServletException, IOException {
-      response.setContentType("text/html;charset=UTF-8");
-      PrintWriter out = response.getWriter();
-       try {
-          String Number = req.getParameter("NumberValue");
-          String operation = req.getParameter("operation");
-
-          double result = (Number == null) ? 0 : Double.valueOf(Number).doubleValue();
-          DecimalFormat mydf = new DecimalFormat("####.#");
-          if ( "sub".equals(operation) ) {
-              req.setAttribute("result", mydf.format(calcSub.sub(result)));
-          }
-          else if ( "add".equals(operation) ) {
-              req.setAttribute("result", mydf.format(calcAdd.add(result)));
-          }
-          this.output=this.calcSub.getOutput();
-          System.out.println("Result is " + req.getAttribute("result"));
-          System.out.println("Output is: "+this.output);
-          getServletContext().getRequestDispatcher("/index.jsp").forward(req, response);
-
-      }
-      catch ( Exception e ) {
-          e.printStackTrace();
-          throw new ServletException(e);
-      } finally {
-          out.close();
-      }
-  } 
-
-
-  @Override
-  protected void doGet(HttpServletRequest request, HttpServletResponse response)
-  throws ServletException, IOException {
-      processRequest(request, response);
-  } 
-
-  @Override
-  protected void doPost(HttpServletRequest request, HttpServletResponse response)
-  throws ServletException, IOException {
-      processRequest(request, response);
-  }
-
-  @Override
-  public String getServletInfo() {
-      return "Short description";
-  }
+
+    protected void processRequest(HttpServletRequest req, HttpServletResponse response) throws ServletException, IOException {
+        response.setContentType("text/html;charset=UTF-8");
+        PrintWriter out = response.getWriter();
+        try {
+            String Number = req.getParameter("NumberValue");
+            String operation = req.getParameter("operation");
+
+            double result = (Number == null) ? 0 : Double.valueOf(Number).doubleValue();
+            DecimalFormat mydf = new DecimalFormat("####.#");
+            if ( "sub".equals(operation) ) {
+                req.setAttribute("result", mydf.format(calcSub.sub(result)));
+            } else if ( "add".equals(operation) ) {
+                req.setAttribute("result", mydf.format(calcAdd.add(result)));
+            }
+            String output = this.calcSub.getOutput();
+            System.out.println("Result is " + req.getAttribute("result"));
+            System.out.println("Output is: "+ output);
+            getServletContext().getRequestDispatcher("/index.jsp").forward(req, response);
+        } catch ( Exception e ) {
+            e.printStackTrace();
+            throw new ServletException(e);
+        } finally {
+            out.close();
+        }
+    } 
+
+    @Override
+    protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        processRequest(request, response);
+    } 
+
+    @Override
+    protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
+        processRequest(request, response);
+    }
+
+    @Override
+    public String getServletInfo() {
+        return "Short description";
+    }
 
 }
 

Added: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml?rev=998234&view=auto
==============================================================================
--- geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml (added)
+++ geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml Fri Sep 17 18:19:24 2010
@@ -0,0 +1,31 @@
+<?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="5">
+    <test name="javaee6-testsuite.EJB3.1Lite">
+        <packages>
+            <package name="org.apache.geronimo.testsuite.javaee6.tests"/>
+        </packages>
+    </test>
+</suite>

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: geronimo/server/trunk/testsuite/javaee6-testsuite/ejb3.1lite-test/src/test/resources/testng.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml