Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-dev] EclipseLink JPA Unit Tests on Glassfish

Hello Edwin,

Attached are the ANT scripts for running the JPA tests on Glassfish:
Please do take a look and let me know if there are any concerns.

Thanks
Darani


For now, 140 JPA tests are running with WebLogic 10.3, 2 of the fail due to https://bugs.eclipse.org/bugs/show_bug.cgi?id=232564. I am expecting a clean run on Glassfish, you may file bugs for those failures. Also could you share the ANT scripts for running the JPA tests on Glassfish?

Thanks,
Edwin

-----Original Message-----
From: Darani Yallapragada [mailto:Darani.Yallapragada@xxxxxxx]
Sent: September 22, 2008 2:47 PM
To: Dev mailing list for Eclipse Persistence Services
Subject: Re: [eclipselink-dev] EclipseLink JPA Unit Tests on Glassfish


Hello Edwin,

Thanks for a detailed email to run the tests. I could run the tests(on 
Glassfish) following your instructions, but i have around 18 errors 
revolving around 1 method and 2 failures .

Did you have a clean run of these tests on other servers?

Thanks
Darani


EDWIN.TANG@xxxxxxxxxx wrote:
  
Hi Darani,

Currently, we only have ANT scripts for running JPA tests on WebLogic 10.3/10.1, OC4J 10.1.3, WebSphere and JBoss. But the support for Glassfish is not ready yet. 

To run the JPA tests on an App server, following these steps:
1. Install App server
2. Go to directory trunk/jpa/eclipselink.jpa.test
3. Setup <AppServerName>.properties, e.g., weblogic.properties, to reflect the App server installation
4. Edit test.properties to set "server.name=weblogic"
5. Execute "ant server-install" for post-installation config
6. Execute "ant server-start" to start server
7. Execute "ant server-setup" to set up connection pool and data source
8. Execute "ant server-test-lrg" to run JPA tests
9. Execute "ant server-reset" to reverse the things have done in server-setup
10. Execute "ant server-stop" to stop server

We are planning to add Glassfish support in the near future. But you can follow the same rules to create glassfish.xml and glassfish.properties and contribute to EclipseLink.

Thanks,
Edwin

-----Original Message-----
From: Darani Yallapragada [mailto:Darani.Yallapragada@xxxxxxx]
Sent: September 11, 2008 1:15 PM
To: Dev mailing list for Eclipse Persistence Services
Subject: [eclipselink-dev] EclipseLink JPA Unit Tests on Glassfish


Hello :

I am planning to run EclipseLink JPA Unit tests on Glassfish. Can anyone 
please guide me through the necessary steps to be taken in order to run 
the tests?

Thank You

Darani





_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
  
    
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
_______________________________________________
eclipselink-dev mailing list
eclipselink-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/eclipselink-dev
  

# SunAS9 Server Testing Environment Properties.

# Standard server properties.
server.user=admin
server.pwd=adminadmin
server.url=http://localhost:4848/
server.testrunner=TestRunner#org.eclipse.persistence.testing.framework.server.TestRunner
server.lib=C:/Users/darani/workspace/publish/glassfish/lib
server.depend=appserv-rt.jar, javaee.jar
server.platform=SunAS9
server.factory=com.sun.enterprise.naming.SerialInitContextFactory

# SunAS9 specific properties.
glassfish.home=C:/Users/darani/workspace/publish/glassfish
glassfish.domain=C:/Users/darani/workspace/publish/glassfish/domains/eclipselink
glassfish.port=4848
glassfish.host=localhost

junit.lib=junit.lib=C:/Users/darani/eclipselink/junit-4.4.jar
eclipselink.jar.name=C:/eclipselink/eclipselink.jar
jdbc.driver.jar=C:/eclipselink/foundation/eclipselink.core.test/derbyclient.jar
<!--/*******************************************************************************
* This program and the accompanying materials are made available under the 
* terms of the Eclipse Public License v1.0 and Eclipse Distribution License v. 1.0 
* which accompanies this distribution. 
* The Eclipse Public License is available at http://www.eclipse.org/legal/epl-v10.html
* and the Eclipse Distribution License is available at 
* http://www.eclipse.org/org/documents/edl-v10.php.
*
*   Ant naming conventions:
*   - regardless of the actual OS platform,'/' is the directory separator
*     (Ant will convert as appropriate).
*   - multi-word properties use periods '.'
*   - multi-word targets use hyphens '-' 
*   - multi-word macros use underscores '_'
*   - multi-word macro attributes are concatinated
*     e.g. 'runpathref'  
*   - multi-word tasks (taskdef) names are concatinated
*     e.g. 'validateconnection'
*   - OS environment variables are in ALLCAPS and have 'env' as a prefix
*     e.g. ${env.XXX}.
*   - Ant properties are lower case.
*
* Contributors:
*     tware - initial API and implementation
#******************************************************************************/-->

<!-- This ant project includes the following tasks:
        - glassfish-install : recreates server and adds jars
        - glassfish-setup : creates connection pool
        - glassfish-reset : removes connection pool
        - glassfish-start : starts server
        - glassfish-stop : stops server
        - glassfish-deploy : deploys ear
        - glassfish-undeploy : undeploys ear

        It requires some configuration of the glassfish.properties, it should be run through build.xml, not directly.
        To connect to the weblogic admin console use http://localhost:4848/console, this may be useful for debugging deployment failures.
        Sometimes if a test or deployment fails, your server gets screwed up and you need to re-install your domain (ant server.install).
-->

<project name="Eclipse Persistence Services JPA SunAS9 Testing" basedir=".">
    
    <property name="env" environment="env" value="env"/>
    <!-- Allows a user to overide certain user specific properties. -->
    <property file="${user.home}/glassfish.properties"/>
    <property file="./test.properties"/>
    <property file="./glassfish.properties"/>
    
    <!-- This creates the server domain. -->
    <target name="glassfish-install">
        <delete dir="${glassfish.domain}"/>
        <mkdir dir="${glassfish.domain}"/>
        <antcall target="glassfish-start" inheritRefs="true"/>
        <copy file="${junit.lib}" todir="${glassfish.domain}/lib"/>
        <copy file="${eclipselink.jar.name}" todir="${glassfish.domain}/lib"/>
        <copy file="${jdbc.driver.jar}" todir="${glassfish.domain}/lib"/>
        <antcall target="glassfish-stop" inheritRefs="true"/> 
    </target>
    
    <!-- Start the server. -->
    <target name="glassfish-start">
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="start-domain"/>
            <arg value="domain1"/>
        </exec>
    </target>
    
    <!--
        This target is to create connection pool and managed datasource required for running JPA tests on the SunAS9 server.
        Note: SunAS9 server must be running.
    -->
    <target name="glassfish-setup">
        
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="create-jdbc-connection-pool"/>
            <arg value="--datasourceclassname"/>
            <arg value="org.apache.derby.jdbc.ClientDataSource"/>
            <arg value="--property"/>
            <arg value="user=${db.user}:password=${db.pwd}:portNumber=1527:dataBaseName=${db.name}:serverName=localhost:connectionAttributes=\;create\=true"/>
            <arg value="jdbc-derby-pool"/>
        </exec> 
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="create-jdbc-resource"/>
            <arg value="--connectionpoolid"/>
            <arg value="jdbc-derby-pool"/>
            <arg value="jdbc/EclipseLinkDS"/>
        </exec> 
    </target>
    
    <!--
        This target is to remove the connection pool and managed datasource created by target <glassfish-setup>
        Note: SunAS9 server must not be running.
    -->
    
    <target name="glassfish-reset">
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="delete-jdbc-resource"/>
            <arg value="jdbc/EclipseLinkDS"/>
        </exec> 
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="delete-jdbc-connection-pool"/>
            <arg value="jdbc-derby-pool"/>
        </exec>  
    </target>
             
   <!-- Stop the server. -->
    
   <target name="glassfish-stop">
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="stop-domain"/>
            <arg value="domain1"/>
        </exec>
    </target>
    
    <!--
        Deploy the application ear to the server.
        Note: SunAS9 server must be running.
    -->
    
    <target name="glassfish-deploy">
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="deploy"/>
            <arg value="--name"/>
            <arg value="${application.name}"/>
            <arg value="${ear.name}"/>
        </exec>
    </target>
    
    <!--
        Undeploy the application ear to the server.
        Note: SunAS9 server must be running.
    -->
   
    <target name="glassfish-undeploy">
        <exec executable="c:/users/darani/workspace/publish/glassfish/bin/asadmin.bat">
            <arg value="undeploy"/>
            <arg value="${application.name}"/> 
        </exec>
    </target>
    
    
    
</project>

Back to the top