[Mulgara-dev] corrupted string-pool?

Paul Gearon gearon at ieee.org
Fri Feb 23 04:24:21 UTC 2007


On Feb 22, 2007, at 7:48 PM, Andrae Muys wrote:

>
> On 23/02/2007, at 10:09 AM, Andrew Newman wrote:
>> This is exactly the kind of thing you do need a test for in order to
>> get a robust system.  The way you do it is not test everything
>> (Mulgara, OS write caching, etc) but you do it with an atomic and
>> integration tests using mocks.  The idea is that you mock out the
>> complicated behaviour you're trying to reproduce so that your test is
>> repoducible every time.  Of course, make sure that the mock behaviour
>> matches the required behavior though.  Much easier and faster to do.
>>
>> Try EasyMock or JMock and make sure that you have an interface to  
>> talk
>> to and you're set.

You're talking about test code that runs in a JVM, but the JVM  
operates at too high a level to be useful here.  The problem can only  
be tested at the libc and operating system level.  ie. killing (not  
stopping, but killing) the JVM while the write behind buffers are full.

Java applications are insulated from this kind of thing, and for good  
reason.  That kind of insulation is fine in 99.9999% of cases, but  
this is one of those cases where we need to cut through that layer.

You're correct in the general case, but not here.  You're probably  
right about the need to test this, but using mocks can't work.

Paul



More information about the Mulgara-dev mailing list