From derby-user-return-12468-apmail-db-derby-user-archive=db.apache.org@db.apache.org Thu Mar 18 15:20:36 2010 Return-Path: Delivered-To: apmail-db-derby-user-archive@www.apache.org Received: (qmail 72490 invoked from network); 18 Mar 2010 15:20:36 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 18 Mar 2010 15:20:36 -0000 Received: (qmail 84071 invoked by uid 500); 18 Mar 2010 15:20:35 -0000 Delivered-To: apmail-db-derby-user-archive@db.apache.org Received: (qmail 83951 invoked by uid 500); 18 Mar 2010 15:20:35 -0000 Mailing-List: contact derby-user-help@db.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Reply-To: "Derby Discussion" Delivered-To: mailing list derby-user@db.apache.org Received: (qmail 83944 invoked by uid 99); 18 Mar 2010 15:20:35 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 15:20:35 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=AWL,RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [209.85.220.226] (HELO mail-fx0-f226.google.com) (209.85.220.226) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 18 Mar 2010 15:20:27 +0000 Received: by fxm26 with SMTP id 26so2441863fxm.15 for ; Thu, 18 Mar 2010 08:20:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.223.4.217 with SMTP id 25mr1410700fas.82.1268925605328; Thu, 18 Mar 2010 08:20:05 -0700 (PDT) X-Originating-IP: [193.206.186.101] In-Reply-To: <4BA2381B.3030600@gmail.com> References: <1f5d398f1003011116n663ac9e1i151c26601215cf83@mail.gmail.com> <1f5d398f1003030020i7c9ff727q1b9a4c02d1dc524d@mail.gmail.com> <1f5d398f1003030252k412a19efi26ee4106f0439d39@mail.gmail.com> <1f5d398f1003030401t653e410ahcbed4fa877df6fa8@mail.gmail.com> <4B8E5D84.2070807@Sun.COM> <1f5d398f1003172305o3ef9c62fx4e7a1dfc98cfae91@mail.gmail.com> <4BA2381B.3030600@gmail.com> Date: Thu, 18 Mar 2010 16:20:05 +0100 Message-ID: <1f5d398f1003180820m19ca728ag479e2b53f986c98f@mail.gmail.com> Subject: Re: cleaning database between test cases From: Gabriele Kahlout To: Derby Discussion Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Can you provide a link to it? Also, is it in some library I could use? 2010/3/18, Bryan Pendleton : >> For testing, how can I make sure the tearDown completely deletes the >> db, and setUp creates a completely new copy, without using in-memory >> db? > > We do this in the Derby regression test suite. > > Have a look at > org.apache.derbyTesting.functionTests.junit.CleanDatabaseTestSetup.java > > thanks, > > bryan > --=20 Regards, K. Gabriele --- unchanged since 25/1/10 --- P.S. Unless a notification (LON), please reply either with an answer OR with " ACK" appended to this subject within 48 hours. Otherwise, I might resend. In(LON, this) =E2=88=A8 In(48h, TimeNow) =E2=88=A8 =E2=88=83x. In(x, MyInbo= x) =E2=88=A7 IsAnswerTo(x, this) =E2=88=A8 (In(subject(this), subject(x)) =E2=88=A7 In(ACK, subject(x)= ) =E2=88=A7 =C2=ACIsAnswerTo(x,this)) =E2=87=92 =C2=ACIResend(this). Also note that correspondence may be received only from specified a priori senders, or if the subject of this email ends with a code, eg. -LICHT01X, then also from senders whose reply contains it. =E2=88=80x. In(x, MyInbox) =E2=87=92 In(senderAddress(x), MySafeSenderList)= =E2=88=A8 (=E2=88=83y. In(y, subject(this) ) =E2=88=A7 In(y,x) =E2=88=A7 isCodeLike(y, -LICHT01X) = ).