You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openmeetings.apache.org by se...@apache.org on 2013/11/01 23:42:53 UTC
svn commit: r1538078 - in /openmeetings/trunk/singlewebapp: build.xml
src/test/java/org/apache/openmeetings/test/derby/PrepareSystemFiles.java
Author: sebawagner
Date: Fri Nov 1 22:42:53 2013
New Revision: 1538078
URL: http://svn.apache.org/r1538078
Log:
OPENMEETINGS-817 Patch file for pointing to derby test instance for testing with derby started as network service in selenium tests
Modified:
openmeetings/trunk/singlewebapp/build.xml
openmeetings/trunk/singlewebapp/src/test/java/org/apache/openmeetings/test/derby/PrepareSystemFiles.java
Modified: openmeetings/trunk/singlewebapp/build.xml
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/build.xml?rev=1538078&r1=1538077&r2=1538078&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/build.xml (original)
+++ openmeetings/trunk/singlewebapp/build.xml Fri Nov 1 22:42:53 2013
@@ -827,7 +827,7 @@
-->
<target name="prepare-selenium-start-openmeetings" description="Prepare selenium tests by starting up an OpenMeetings instance"
- depends="prepare-selenium-stop-openmeetings, -prepare-selenium-port-properties" >
+ depends="-prepare-selenium-port-properties, prepare-selenium-stop-openmeetings" >
<exec dir="${dist.dir}/testred5" executable="red5-highperf.bat" osfamily="windows" output="${dist.dir}/testred5/red5_system.log">
</exec>
<!--this does only make sense if the unix executable is run obviously, however we do it for all -->
@@ -854,10 +854,18 @@
<target name="prepare-selenium-test-database" description="Prepare selenium database script">
<java classname="org.apache.openmeetings.test.derby.PrepareSystemFiles">
- <arg value="${dist.dir}/testred5/webapps/openmeetings"/>
+ <!-- the home directory of the test instance of red5 -->
+ <arg value="${dist.dir}/testred5/webapps/openmeetings"/>
+ <!-- the directory where the openmeetings database is created by derby -->
+ <arg value="${basedir}/${dist.dir}/testred5/"/>
+ <!-- the persistance file to patch -->
+ <arg value="${basedir}/src/main/webapp/WEB-INF/classes/META-INF/persistence.xml"/>
<classpath refid="junit.classpath" />
</java>
</target>
+
+ <target name="debug-prepare-selenium-copy-test-instance" depends="-prepare-selenium-copy-test-instance">
+ </target>
<target name="-prepare-selenium-copy-test-instance" description="Prepare selenium tests by starting up an OpenMeetings instance">
<copy todir="${dist.dir}/testred5">
Modified: openmeetings/trunk/singlewebapp/src/test/java/org/apache/openmeetings/test/derby/PrepareSystemFiles.java
URL: http://svn.apache.org/viewvc/openmeetings/trunk/singlewebapp/src/test/java/org/apache/openmeetings/test/derby/PrepareSystemFiles.java?rev=1538078&r1=1538077&r2=1538078&view=diff
==============================================================================
--- openmeetings/trunk/singlewebapp/src/test/java/org/apache/openmeetings/test/derby/PrepareSystemFiles.java (original)
+++ openmeetings/trunk/singlewebapp/src/test/java/org/apache/openmeetings/test/derby/PrepareSystemFiles.java Fri Nov 1 22:42:53 2013
@@ -37,9 +37,13 @@ public class PrepareSystemFiles {
try {
OmFileHelper.setOmHome(args[0]);
+ String databaseHomeDirectory = args[1];
+
+ String persistanceFileToPatch = args[2];
+
ConnectionProperties connectionProperties = new ConnectionProperties();
- File conf = new File(OmFileHelper.getWebinfDir(), "classes/META-INF/persistence.xml");
+ File conf = new File(persistanceFileToPatch);
if (conf.exists()) {
conf.delete();
@@ -52,7 +56,7 @@ public class PrepareSystemFiles {
, conf
, "localhost"
, "1527"
- , "OpenMeetingsSeleniumTest"
+ , databaseHomeDirectory + "openmeetings"
, "user"
, "secret"
);