Berin Loritsch wrote:

> Leif Mortenson wrote:
> 
>> Ok, I went ahead and added a new task called test-subset which lets 
>> you run individual or subsets of tests.  The syntax looks like this:
>>
>> build -Djunit.test=**/ResourceLimiting*TestCase.class test-subset
> 
> Did you get the mail I had that had the junit-report tag?


Yes, I saw it but I had not realized that the differences in what was 
being tested in the 'check' and 'test-report' tasks was intentional and 
took the opportunity to reduce duplicate code.

Ok, I modified the build so that it will now run all the tests when you 
do a build dist.  And only the fast tests when you run build check. 
Take a look and see if this works for you.  It uses the unless attribute 
to avoid duplicating code.


I am having one problem with the junitreport task however.  It works 
fine on my work machine, but on my home machine (W2K), junitreport is 
saying that two of the xml reports are corrupted.

Here is the error I am getting.
---
The file 
C:\Jakarta\jakarta-avalon-excalibur\build\reports\TEST-org.apache.avalon.excalibur.pool.test.ResourceLimitingPoolMultithreadMaxStrictTestCase.xml
 
is not a valid XML document. It is possibly corrupted.
The file 
C:\Jakarta\jakarta-avalon-excalibur\build\reports\TEST-org.apache.avalon.excalibur.pool.test.ResourceLimitingPoolMultithreadMaxTestCase.xml
 
is not a valid XML document. It is possibly corrupted.
---

This does not break the build, the two tests just do not show up in the 
HTML reports.

Running with debug on, you can see the cause:
org.xml.sax.SAXParseException: Attribute "time" was already specified 
for element "testcase".

Being caused by xml like:
   <testcase name="testGetPut" time="0.032" time="0.032"></testcase>

This looks like a bug in the ant junit task.


Let me know how you feel about these changes.
Cheers,
Leif



>> I also merged the test and test-report tasks into a single task.  They 
>> were testing different things because people had not been modifying 
>> both of them over time.
> 
> 
> 
> No, they were testing different things because the test task was meant to
> be a *quick* sanity check, and the test-report task was meant to be 
> included
> in the documentation.
> 
> 
>> The way it is now, the test reports are always generated by the test 
>> task, but the TEST-*.xml files are deleted to remove clutter.
>>
>> When I was merging the tasks, I noticed that the test task was 
>> excluding the following tests, while the test-report task was not.  
>> Currently this code is commented out so they always run.
>>
>>         <exclude 
>> name="org/apache/avalon/excalibur/naming/rmi/test/RMIContextTestCase.class"/> 
>>
>>         <exclude 
>> name="org/apache/avalon/excalibur/logger/test/LogKitManagementTestCase.class"/> 
>>
>>         <exclude 
>> name="org/apache/avalon/excalibur/concurrent/test/ReadWriteLockTestCase.class"/> 
>>
>>         <exclude 
>> name="org/apache/avalon/excalibur/monitor/test/MonitorTestCase.class"/>
> 
> 
> 
> It is because those tests take a while to perform.  The test/check task was
> meant completely as a quick sanity test so developers could do:
> 
> $ant clean all check
> 
> The longer tests make it difficult to keep up your train of thought when 
> you
> are developing.  This was Peter's idea.
> 
> 
> 
>> Right now there is 1 failure in the 
>> org.apache.avalon.excalibur.monitor.test package and 2 errors in the 
>> org.apache.avalon.excalibur.i18n.test package.
> 
> 
> 
> I have worked long and hard to make the monitor test to always work--the
> problem is that the test is timing out before the JVM has a chance to
> propogate the PropertyChangeEvent to all it's listeners.  I have been
> meaning to take control from the PropertyChange utility class in the JVM
> and do it myself explicitly.  The utility takes too long.
> 
> 
> 



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to