Thanks for your reply Stephen.

On Wed, 2004-03-31 at 18:55, Stephen McConnell wrote:
> Bruno:
> 
> Not sure what the problem is but my feeling is that your build may be a 
> little out of sync.  There are currently a lot of updates going into the 
> excalibur content and I'm replicating version changes into the merlin 
> and associated packages - and other associated housekeeping stuff. 
> Currently I'm getting a clean build but I need to make a few commits 
> later this evening following synchronization of cornerstone, repository 
> and merlin with recent excalibur updates.

I had been thinking something like that. My avalon dir was a fresh
checkout (done this morning) though. Also, I'm not building anything
from excalibur myself, but just relying on the downloaded artifacts.
Maybe I'd better build that from CVS too?

The first problem where it hangs on the "CodeSecurityEnabledTestCase" is
however somewhat stranger. I've meanwhile noticed that sometimes (but
not very often) it does pass that test, but then hangs on the
CodeSecurityDisabledTestCase.

Because of this random behaviour, I had some suspicion that this might
have something to do with the thread-related stuff in the commissioner,
and I think I found a problem there. More specifically, in the
commissioner is the following code:

            m_queue.put( request );
            long t = request.waitForCompletion();

The waitForCompletion method will wait until it is notified (assuming
timeout is 0 which is the case in those tests):

            wait( timeout ); // wait for commission/decommission

What if in between the m_queue.put call and the the
request.waitForCompletion call, the commissioner thread takes the
request from the queue and finishes the commissioning and calls
request.done, before the wait(timeout) starts? In that case it would
wait indefinitely.

As a quick fix, I've added an additional test before the wait:

            if( m_completed ) {
                long t2 = System.currentTimeMillis();
                return t2-t1;
            }
            wait( timeout ); // wait for commission/decommission

and now the testcases run fine for me. I guess this doesn't solve the
problem completely yet since request.done() might still happen between
the if and the wait, it only becomes less likely. Will think about it
some more tomorrow.

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]                          [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to