axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
Subject testing optional components (was RE: cvs commit: xml-axis/java/sr c/org/apache/axis/transport/http
Date Tue, 22 Jul 2003 17:40:41 GMT
Thanks Tom.

Apropos of this changeset, does anyone have any advice on how best to
provide tests/samples for the CommonsHTTPSender integration?  I hacked up a
copy of samples.client.DynamicInvoker last night to make it invoke the same
service in multiple threads, cranked up the logging on httpclient, and ran
some tests with different settings defined via system properties.  It all
worked fine -- I was able to see logging messages about connections being
recycled when the number of threads was greater than the number of
connections allowed; similarly, I was able to see logging messages about new
connections being created when the number of threads was less than the
number of connections allowed.

But, this really should be an automated test, not a sample.  The problem is
(1) the tests can't assume that httpclient is present, since it's an
optional component; (2) junit doesn't support assertions on logging
messages, and so there isn't a good way to verify that the pool is being
exploited from within axis.  Obviously the tests shouldn't be trying to
cover httpclient itself (that would be an integration test, not a unit
test), but it does seem that it would be useful for the test suite to
include some kind of coverage for the integrity of this integration.

Oh, and I did run last night's tests against the HEAD of httpclient, as dims
requested -- all worked well.


-----Original Message-----
From: Tom Jordahl []
Sent: Monday, July 21, 2003 8:48 AM
To: ''
Subject: RE: cvs commit:

Nice job Eric!

Tom Jordahl
Macromedia Server Development

-----Original Message-----
From: [] 
Sent: Sunday, July 20, 2003 7:59 PM
Subject: cvs commit: xml-axis/java/src/org/apache/axis/transport/http

ericf       2003/07/20 16:58:37

  Modified:    java     build.xml
  Added:       java/src/org/apache/axis/components/net
  Added configuration support to CommonsHTTPSender, making it possible
  to set the size of the connection pool, the number of connections
  allowed per host by the pool, and the timeout on allocating a
  connection from the pool.  All values are identical to the defaults
  of Commons HTTP Client, so there is no change to the existing
  behavior.  The default implementation of the new interface for
  configuring these values reads them from AxisProperties, which fall
  back to system properties, making it possible to configure these
  settings through that mechanism as well.  Connection timeout --
  both in creating the connection and in blocking for socket reads
  -- is derived from the Axis message for a specific request, just
  as it is in the "regular" http transport.  This preserves the
  transparent pluggability of the commons http transport option and
  separates the concern of connection timeouts from that of pooled
  resource management.
  None of these files are compiled unless commons-httpclient is present;
  hence the modifications to build.xml
  This enhancement was built against Commons HTTPClient 2.0 beta 2

View raw message