You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ss...@macromedia.com on 2001/05/22 01:28:03 UTC

[PATCH] utils.cache.JavaMethod & build.xml & unit tests for utils

Hi All,

Submitting a small patch for a bug in utils.cache.JavaMethod where the
constructor was not saving more than one method name if multiple methods
with the same names were found.

Submitting a unit test to go with it (more on these below).

I'd like to submit the attached changes to the build.xml.  They are changes
to use the xml formatter for the JUnit tests, and write them to a directory
called test-reports.  I find the xml output of the tests extremely useful.
They can also be aggregated and transformed into nice HTML output, which
might be something to add to the build at Jakarta, but I didn't add because
it really slows down the test runtime to generate those results.  Also added
the debug="on" setting to the javac task for the unit tests since this helps
debug when the unit tests fail.

Submitting a set of unit tests (axis-tests.zip) for the utils and utils and
utils.cache classes.  Did not unit test Options or Admin because I have some
questions about how the heck that Options class works and what kind of
condition it's in.  I tried to get tcpmon to work, but not sure what it's
supposed to do -- is it a general tcp sniffer or will it only work with
Axis? The NSStack and LockHashtable I just haven't written tests for yet.
No test for Debug since it seems unlikely to fail and may be deleted down
the road anyway according to comments.

I added a ConsumerPipe class under test/utils for reading a
PipedOutputStream and getting the results as a String for comparison in a
couple of the TestXMLUtils unit tests. On Linux with JDK 1.3.1 the two tests
that use this fail about 1 out 4 times.  I can't tell if it's a threading
problem with the ConsumerPipe class, or maybe the underlying XMLSerializer
class.  Any ideas?

Other questions:

- Do you want XMLUtils.ElementToStream() to omit the XML declaration like
ElementToString()?  It does not.

- Would it make more sense to rename the isFlagSet and isValueSet methods of
the Options class so that they adhere to Java coding conventions?  One
returns an int, the other a String, but from the names you'd expect a
boolean from both.

- Someone puts semi-colons at the end of some class and method declarations
as in C++ (see QName.java, e.g.).  Doesn't affect anything, but it looks
kind of funny.  Perhaps someone was coding back and forth from C++ to Java
one day.

Scott Stirling
Macromedia



Re: [PATCH] utils.cache.JavaMethod & build.xml & unit tests for utils

Posted by Rob Jellinghaus <ro...@unrealities.com>.
At 07:28 PM 5/21/2001 -0400, sstirling@macromedia.com wrote:
>I tried to get tcpmon to work, but not sure what it's
>supposed to do -- is it a general tcp sniffer or will it only work with
>Axis? 

It's a general TCP sniffer.

>- Someone puts semi-colons at the end of some class and method declarations
>as in C++ (see QName.java, e.g.).  Doesn't affect anything, but it looks
>kind of funny.  Perhaps someone was coding back and forth from C++ to Java
>one day.

That would be Doug :-)  I'm removing 'em in files I'm touching.

I look forward to seeing what you can do with the functional test
infrastructure I will be sending out later today (or possibly earlyish
(PST) tomorrow)!  You can get a preview of it in my email from last week.

Cheers,
Rob