jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Mueller <muel...@adobe.com>
Subject Re: All in-memory and unit/integration tests
Date Tue, 29 Mar 2011 11:48:23 GMT
Hi,

Are you sure you have used "jdbc:h2:memFS:test" for H2, and not
"jdbc:h2:mem:test"? (Please note memFS versus mem.) The prefix "memFS:" is
an in-memory file system, which keeps the data within the same process and
class loader, while the prefix "mem:" is an in-memory database, where the
data is lost when the last connection is closed.

Regards,
Thomas

On 3/29/11 1:42 PM, "Bruno Dusausoy" <bdusausoy@yp5.be> wrote:

>On 03/29/2011 12:30 PM, Thomas Mueller wrote:
>> Hi,
>>
>> Could you try with a regular (persisted) database? For example, using
>>the
>> database URL "jdbc:h2:/temp/test".
>>
>> I guess you will still get the same result, but let's see.
>>
>> If the data is still lost between closing and opening a session, then
>> there must be some code that actively deletes the data.
>>
>> If it works with a persisted database, then the question is: do you
>>start
>> a new process, or use a different class loader for each test? If yes
>>then
>> preserving the data is not possible, except when using a persisted
>> database (or file system).
>>
>> Regards,
>> Thomas
>
>As I said, if I use a regular filesystem-based configuration, like the
>default one, it all goes well, my unit tests all pass, so my code is not
>deleting anything (that's the point of my code : to persist data, btw).
>All accesses are done within the same test method, thus within the same
>process.
>
>I'll keep searching what could be wrong with the configuration.
>
>Regards.
>
>--
>Pensez environnement : limitez l'impression de ce mail.
>Please don't print this e-mail unless you really need to.


Mime
View raw message