You are viewing a plain text version of this content. The canonical link for it is here.
Posted to derby-dev@db.apache.org by Mamta Satoor <ms...@gmail.com> on 2013/09/04 18:23:56 UTC

Can a junit test pick up an existing db(rather than creating one itself) and run the test fixtures against it?

Hi,

I am working on DERBY-6317(Optmizer can choose the wrong path when
BTreeCostController.java returns an estimate cost and row count of 0.0) and
have a stand alone reproducible test case. The program has to create a very
large db to reproduce the problem.

Now, I am working on writing a junit test and having the junit test create
a similar db but the problem does not reproduce. I am wondering if it is
possible(for experimental purposes) for the junit test to pick up an
existing db(the one I have created from stand alone reproducible case) and
run the test fixtures against it to reproduce the problem. This will verify
for me that the test fixture is working fine when working against a known
reproducible db.

thanks,
Mamta

Re: Can a junit test pick up an existing db(rather than creating one itself) and run the test fixtures against it?

Posted by Mamta Satoor <ms...@gmail.com>.
Thanks Kathey.


On Wed, Sep 4, 2013 at 9:56 AM, Katherine Marsden <
kmarsdenderby@sbcglobal.net> wrote:

> On 9/4/2013 9:23 AM, Mamta Satoor wrote:
>
>> Hi,
>>
>> I am working on DERBY-6317(Optmizer can choose the wrong path when
>> BTreeCostController.java returns an estimate cost and row count of 0.0) and
>> have a stand alone reproducible test case. The program has to create a very
>> large db to reproduce the problem.
>>
>> Now, I am working on writing a junit test and having the junit test
>> create a similar db but the problem does not reproduce. I am wondering if
>> it is possible(for experimental purposes) for the junit test to pick up an
>> existing db(the one I have created from stand alone reproducible case) and
>> run the test fixtures against it to reproduce the problem. This will verify
>> for me that the test fixture is working fine when working against a known
>> reproducible db.
>>
>>
> Yes, you can put a copy of your  database in place as system/wombat and
> the test will  pick that up for your testing.
>
>  thanks,
>> Mamta
>>
>
>

Re: Can a junit test pick up an existing db(rather than creating one itself) and run the test fixtures against it?

Posted by Katherine Marsden <km...@sbcglobal.net>.
On 9/4/2013 9:23 AM, Mamta Satoor wrote:
> Hi,
>
> I am working on DERBY-6317(Optmizer can choose the wrong path when 
> BTreeCostController.java returns an estimate cost and row count of 
> 0.0) and have a stand alone reproducible test case. The program has to 
> create a very large db to reproduce the problem.
>
> Now, I am working on writing a junit test and having the junit test 
> create a similar db but the problem does not reproduce. I am wondering 
> if it is possible(for experimental purposes) for the junit test to 
> pick up an existing db(the one I have created from stand alone 
> reproducible case) and run the test fixtures against it to reproduce 
> the problem. This will verify for me that the test fixture is working 
> fine when working against a known reproducible db.
>

Yes, you can put a copy of your  database in place as system/wombat and 
the test will  pick that up for your testing.

> thanks,
> Mamta


Re: Can a junit test pick up an existing db(rather than creating one itself) and run the test fixtures against it?

Posted by Mamta Satoor <ms...@gmail.com>.
Hi Myrna,

Thanks for your reply. I just want to do SELECTs against that db in the
test fixture so it does not need to be a writeable db.

Mamta


On Wed, Sep 4, 2013 at 9:48 AM, Myrna van Lunteren
<m....@gmail.com>wrote:

> Hi Mamta,
>
> Does it need to be a writeable database? Otherwise, perhaps you can do
> something with putting a database in a jar, and connecting to that?
>
> Myrna
>
>
> On Wed, Sep 4, 2013 at 9:23 AM, Mamta Satoor <ms...@gmail.com> wrote:
>
>> Hi,
>>
>> I am working on DERBY-6317(Optmizer can choose the wrong path when
>> BTreeCostController.java returns an estimate cost and row count of 0.0) and
>> have a stand alone reproducible test case. The program has to create a very
>> large db to reproduce the problem.
>>
>> Now, I am working on writing a junit test and having the junit test
>> create a similar db but the problem does not reproduce. I am wondering if
>> it is possible(for experimental purposes) for the junit test to pick up an
>> existing db(the one I have created from stand alone reproducible case) and
>> run the test fixtures against it to reproduce the problem. This will verify
>> for me that the test fixture is working fine when working against a known
>> reproducible db.
>>
>> thanks,
>> Mamta
>>
>
>

Re: Can a junit test pick up an existing db(rather than creating one itself) and run the test fixtures against it?

Posted by Myrna van Lunteren <m....@gmail.com>.
Hi Mamta,

Does it need to be a writeable database? Otherwise, perhaps you can do
something with putting a database in a jar, and connecting to that?

Myrna


On Wed, Sep 4, 2013 at 9:23 AM, Mamta Satoor <ms...@gmail.com> wrote:

> Hi,
>
> I am working on DERBY-6317(Optmizer can choose the wrong path when
> BTreeCostController.java returns an estimate cost and row count of 0.0) and
> have a stand alone reproducible test case. The program has to create a very
> large db to reproduce the problem.
>
> Now, I am working on writing a junit test and having the junit test create
> a similar db but the problem does not reproduce. I am wondering if it is
> possible(for experimental purposes) for the junit test to pick up an
> existing db(the one I have created from stand alone reproducible case) and
> run the test fixtures against it to reproduce the problem. This will verify
> for me that the test fixture is working fine when working against a known
> reproducible db.
>
> thanks,
> Mamta
>