axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject [PATCH] utils.cache.JavaMethod & build.xml & unit tests for utils
Date Mon, 21 May 2001 23:28:03 GMT

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 ( 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, 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

View raw message