qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rafael Schloming <rafa...@redhat.com>
Subject Re: Java - CPP Test profile failures
Date Tue, 15 Jul 2008 21:21:46 GMT
Martin Ritchie wrote:
> Hi,
> When running on my RHEL4 box with -Dprofile=cpp I'm getting a number
> of failures due to the way we run our tests.
> As a fresh broker is created for each test it appears that
> occasionally the Socket hasn't been released so the next test can't
> have a fresh broker.
> Has anyone else found this? How easy would it be for the tests to
> start the broker on a random port or for the broker to pick a free
> port to start up on and the QpidTestCase to extract that and use it in
> the tests?

I haven't seen this particular issue before. I'm a bit puzzled by how it 
can occur since I believe the broker sets the SO_REUSADDR option on the 
socket, and QpidTestCase should block until the broker process exits.

In any case, I think it shouldn't be too difficult to make the change 
you suggest. If you specify -p0 the broker will bind to an unused port. 
QpidTestCase already scans for a log message from the broker in order to 
verify that it has actually bound to the port before allowing the test 
to run. It should be straightforward to modify that same code to regex 
out the chosen port number.


View raw message