Gero,
I once had a proposal for being able to multithread tasks for this very reason.
I still haven't added it. Anyway, today, I just run
two instances of ant. One to run the server and one to run the tests. Slightly
inconvenient but not hugely so. Note the document
does not say a separat thread, but a separate virtual machine. This is true but
it is still synchronous. That VM must exist before
ant will continue.
Conor
----- Original Message -----
From: "Gero Vermaas" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, December 15, 2000 9:07 PM
Subject: WLRun in a separate thread
Hi,
I'm trying to use the WLRun task and have the following problem (See Ant target
below): WebLogic is started, but the Ant does not
continue with the jUnit task. So how do I start WebLogic and after that run the
unit tests.
According to the documentation the WLRun tasks runs the WebLogic in a separate
Thread. However my experience is that Ant waits
untill WebLogic is stopped before it continues with the following tasks.
Am I missing something or it is just not possible what I want?
[NOTE: I removed the classpaths below to keep the XML readable}
<target name="unittest" depends="compileunittest" >
<delete>
<fileset dir="." includes="**/TEST-*.xml" />
</delete>
<property name="deploy_properties" file="${deploy_env_dev}"/>
<wlrun home="C:\weblogic"
classpath="...." // removed details
properties="weblogic.properties"
name="server"
policy=".\weblogic.policy"
jvmargs...." > // removed details ..
</wlrun>
<junit printsummary="yes" haltonfailure="yes" >
<jvmarg value="-Djava.compiler=NONE"/>
<jvmarg
value="-Dunittest.commercepool.driver=${commercePool_driver}" />
<jvmarg value="-Dunittest.commercepool.url=${commercePool_url}" />
<jvmarg
value="-Dunittest.deploy_ejblib_dir_dev=${deploy_ejblib_dir_dev}" />
<jvmarg value="-DWSPort=${WSPort}" />
<jvmarg value="-Dcomputername=${computername}" />
<jvmarg
value="-Dweblogic.password.system=${weblogic.password.system}" />
<classpath>
<pathelement location="${test.dir}/${classes.dir}" />
<fileset dir="${test.dir}/lib">
<include name="*.jar" />
</fileset>
<pathelement path="${java.class.path}" />
</classpath>
<formatter type="plain" usefile="no" />
<batchtest fork="yes">
<fileset dir="${test.dir}/${src.dir}"
includesfile="${test.dir}/include_unittest.txt"
excludesfile="${test.dir}/exclude_unittest.txt"/>
</batchtest>
</junit>
<wlstop
classpath="..."
user="system"
password="weblogic"
url="t3://localhost:80">
</wlstop>
Regards,
Gero Vermaas