Re: Unit testing, stup and tearDown

2007-07-12 Thread James Strachan
On 7/11/07, Elliotte Harold <[EMAIL PROTECTED]> wrote: On 7/6/07, James Strachan <[EMAIL PROTECTED]> wrote: > > I don't see anything wrong I'm afraid. Maybe there's some timing issue > where the close of the connection is a tad asynchronous in some aspect > of closing the broker down properly. >

Re: Unit testing, stup and tearDown

2007-07-11 Thread Elliotte Harold
I've fixed/kludged the latest instance of this problem by manually draining the queue before sending in my test messages; e.g. while (true) { TextMessage m1 = (TextMessage) consumer.receive(3000); if (m1 == null) break; } The problem seems to be that under som

Re: Unit testing, stup and tearDown

2007-07-11 Thread Elliotte Harold
On 7/6/07, James Strachan <[EMAIL PROTECTED]> wrote: I don't see anything wrong I'm afraid. Maybe there's some timing issue where the close of the connection is a tad asynchronous in some aspect of closing the broker down properly. FWIW lots of the test cases in ActiveMQ derive from EmbeddedBro

Re: Unit testing, stup and tearDown

2007-07-10 Thread Elliotte Harold
After adding Derby to the classpath and async=true to the broker string, the tests now fail both when run individually and when run in a group. I still don't understand why the tests are fialing at all, and some other tests are failing sporadicall. Sometimes I can run two test suites in a row an

Re: Unit testing, stup and tearDown

2007-07-10 Thread Elliotte Harold
On 7/9/07, Rob Davies <[EMAIL PROTECTED]> wrote: It would be interesting to see if setting the async flag = false makes a difference on the vm:// transport: e.g. factory = new ActiveMQConnectionFactory("vm://localhost? broker.persistent=false,async=false"); The immediate result of that is br

Re: Unit testing, stup and tearDown

2007-07-09 Thread Rob Davies
It would be interesting to see if setting the async flag = false makes a difference on the vm:// transport: e.g. factory = new ActiveMQConnectionFactory("vm://localhost? broker.persistent=false,async=false"); cheers, Rob On Jul 3, 2007, at 5:09 PM, Elliotte Harold wrote: I have a bunch of

Re: Unit testing, stup and tearDown

2007-07-06 Thread Elliotte Harold
On 7/6/07, James Strachan <[EMAIL PROTECTED]> wrote: FWIW lots of the test cases in ActiveMQ derive from EmbeddedBrokerTestSupport which explicitly creates/stops a broker which might help work around this glitch. e.g. in your test try creating, before the connection (and stopping after the con

Re: Unit testing, stup and tearDown

2007-07-05 Thread James Strachan
I don't see anything wrong I'm afraid. Maybe there's some timing issue where the close of the connection is a tad asynchronous in some aspect of closing the broker down properly. FWIW lots of the test cases in ActiveMQ derive from EmbeddedBrokerTestSupport which explicitly creates/stops a broker

Unit testing, stup and tearDown

2007-07-03 Thread Elliotte Harold
I have a bunch of ActiveMQ tests that are exhibiting weird behavior. That is, sometimes they pass and sometimes they fail. I can run a suite and see seven failures. Then run those tests individually and watch them all pass. This suggests to me that I'm not properly initializing the queue in setUp