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 Vemund Ostgaard - Sun Norway <Ve...@Sun.COM> on 2006/02/28 11:06:36 UTC

Questions about sanity test

Hello,
I have been reading a readme file explaining the testing in the 
org.apache.derbyTesting package, and have a couple of questions in that 
regard.

I am looking for a minimal sanity test to verify that an installation of 
Derby is healthy, that the most basic functionality works. I'm not 
exactly sure what such a test for Derby ideally should contain, but I am 
thinking something like:
* create database
* create table (with index), insert record, update record, read record, 
delete record, delete table
* do this through 'ij', embedded, and with network client.
Should try to make the test robust with regards to changes in the 
product or different vms.

Do you have any opinions on what such a test for Derby should or 
shouldn't do?

Does something like this allready exist?

If it doesn't exist, would I most likely find the necessary tests or 
building blocks somewhere within the derbyTesting package, so I could 
just glue it together as a suite, or will I have to write it from scratch?

Would such a test be useful for you (or your customers)?

Thanks,
Vemund

Re: Questions about sanity test

Posted by Vemund Ostgaard <Ve...@Sun.COM>.
Myrna van Lunteren wrote:

> Hi,
>  
> For the most basic check, I run sysinfo. :-)
> After that, I run the test lang/supersimple.sql. So, I'd do:
>  
> java org.apache.derbyTesting.functionTests.harness.RunTest 
> lang/supersimple.sql
> java -Dframework=DerbyNetClient 
> org.apache.derbyTesting.functionTests.harness.RunTest 
> lang/supersimple.sql
>  
> The test harness creates the database, and as this is a .sql test, in 
> essence, it uses ij. Running without any framework parameter defaults 
> to embedded, DerbyNetClient runs it with the network client.
>  

Thank you, Myrna. I will look closer at the test and the harness to 
understand how this works. From what you say this sounds close to what I 
was looking for.

Vemund

Re: Questions about sanity test

Posted by Andrew McIntyre <mc...@gmail.com>.
On 3/7/06, Myrna van Lunteren <m....@gmail.com> wrote:
> On 3/7/06, Vemund Ostgaard <Ve...@sun.com> wrote:
> > Warning: Cleanup failed on baseDir:
> > ~/derby/testruns/DerbyNetClient/supersimple
> >
> > I see that the DerbyNetClient catalog has an empty catalog named
> > supersimple and a supersimple.pass file. One level above there is a
> > derby_tests.policy file.
> >
> > Any idea why it might be that I get this warning, what is it the test
> > failed to clean up?
>
> I see that message too...it's been there as long as there have been network
> server tests, I think. I never bothered to investigate or try to fix the
> harness to actually remove what it reports it can't... The next time the
> test runs, it will successfully replace any files it created...So whatever
> it can't delete, is harmless. (except for possibly filling up the disk with
> empty directories, policy files and 1 liner .pass files).
>
> Anyone else have any history on this message?
>
> If you care, you could log it in JIRA as something that needs to be fixed,
> or at least explained/documented better in the java/testing/README.htm file.

This has been there for a long time, indeed. The test harness is
trying to delete the entire directory mentioned in the "Warning:
cleanup failed" message and attempting to do so (with File.delete())
fails. This could be due to a process still holding on to a file
descriptor for the directory mentioned or something still active in
the directory at that time. It's harmless, but could probably be
resolved if someone really had an itch to figure it out.

andrew

Re: Questions about sanity test

Posted by Myrna van Lunteren <m....@gmail.com>.
On 3/7/06, Vemund Ostgaard <Ve...@sun.com> wrote:
>
> Myrna van Lunteren wrote:
>
> > For the most basic check, I run sysinfo. :-)
> > After that, I run the test lang/supersimple.sql. So, I'd do:
> >
> > java org.apache.derbyTesting.functionTests.harness.RunTest
> > lang/supersimple.sql
> > java -Dframework=DerbyNetClient
> > org.apache.derbyTesting.functionTests.harness.RunTestlang/supersimple.sql
>
> When running the test with -Dframework=DerbyNetClient i get a warning at
> the end that I do not get when running it embedded:
> *** End:   supersimple jdk1.5.0_06 DerbyNetClient 2006-03-07 13:36:58 ***
> Warning: Cleanup failed on baseDir:
> ~/derby/testruns/DerbyNetClient/supersimple
>
> I see that the DerbyNetClient catalog has an empty catalog named
> supersimple and a supersimple.pass file. One level above there is a
> derby_tests.policy file.
>
> Any idea why it might be that I get this warning, what is it the test
> failed to clean up?
>
> Vemund
>


I see that message too...it's been there as long as there have been network
server tests, I think. I never bothered to investigate or try to fix the
harness to actually remove what it reports it can't... The next time the
test runs, it will successfully replace any files it created...So whatever
it can't delete, is harmless. (except for possibly filling up the disk with
empty directories, policy files and 1 liner .pass files).

Anyone else have any history on this message?

If you care, you could log it in JIRA as something that needs to be fixed,
or at least explained/documented better in the java/testing/README.htm file.


Myrna

Re: Questions about sanity test

Posted by Vemund Ostgaard <Ve...@Sun.COM>.
Myrna van Lunteren wrote:

> For the most basic check, I run sysinfo. :-)
> After that, I run the test lang/supersimple.sql. So, I'd do:
>  
> java org.apache.derbyTesting.functionTests.harness.RunTest 
> lang/supersimple.sql
> java -Dframework=DerbyNetClient 
> org.apache.derbyTesting.functionTests.harness.RunTest lang/supersimple.sql

When running the test with -Dframework=DerbyNetClient i get a warning at 
the end that I do not get when running it embedded:
*** End:   supersimple jdk1.5.0_06 DerbyNetClient 2006-03-07 13:36:58 ***
Warning: Cleanup failed on baseDir: 
~/derby/testruns/DerbyNetClient/supersimple

I see that the DerbyNetClient catalog has an empty catalog named 
supersimple and a supersimple.pass file. One level above there is a 
derby_tests.policy file.

Any idea why it might be that I get this warning, what is it the test 
failed to clean up?

Vemund

Re: Questions about sanity test

Posted by Myrna van Lunteren <m....@gmail.com>.
On 2/28/06, Vemund Ostgaard - Sun Norway <Ve...@sun.com> wrote:
>
> Hello,
> I have been reading a readme file explaining the testing in the
> org.apache.derbyTesting package, and have a couple of questions in that
> regard.
>
> I am looking for a minimal sanity test to verify that an installation of
> Derby is healthy, that the most basic functionality works. I'm not
> exactly sure what such a test for Derby ideally should contain, but I am
> thinking something like:
> * create database
> * create table (with index), insert record, update record, read record,
> delete record, delete table
> * do this through 'ij', embedded, and with network client.
> Should try to make the test robust with regards to changes in the
> product or different vms.
>
> Do you have any opinions on what such a test for Derby should or
> shouldn't do?
>
> Does something like this allready exist?
>
> If it doesn't exist, would I most likely find the necessary tests or
> building blocks somewhere within the derbyTesting package, so I could
> just glue it together as a suite, or will I have to write it from scratch?
>
> Would such a test be useful for you (or your customers)?
>
> Thanks,
> Vemund
>


Hi,

For the most basic check, I run sysinfo. :-)
After that, I run the test lang/supersimple.sql. So, I'd do:

java org.apache.derbyTesting.functionTests.harness.RunTestlang/supersimple.sql
 java -Dframework=DerbyNetClient
org.apache.derbyTesting.functionTests.harness.RunTest lang/supersimple.sql
The test harness creates the database, and as this is a .sql test, in
essence, it uses ij. Running without any framework parameter defaults to
embedded, DerbyNetClient runs it with the network client.

Myrna