Return-Path: Delivered-To: apmail-openjpa-dev-archive@www.apache.org Received: (qmail 65884 invoked from network); 1 Jul 2009 18:00:05 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Jul 2009 18:00:05 -0000 Received: (qmail 64272 invoked by uid 500); 1 Jul 2009 18:00:16 -0000 Delivered-To: apmail-openjpa-dev-archive@openjpa.apache.org Received: (qmail 64201 invoked by uid 500); 1 Jul 2009 18:00:15 -0000 Mailing-List: contact dev-help@openjpa.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@openjpa.apache.org Delivered-To: mailing list dev@openjpa.apache.org Received: (qmail 64191 invoked by uid 99); 1 Jul 2009 18:00:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2009 18:00:15 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 01 Jul 2009 18:00:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 25D7C234C004 for ; Wed, 1 Jul 2009 10:59:47 -0700 (PDT) Message-ID: <1142728867.1246471187141.JavaMail.jira@brutus> Date: Wed, 1 Jul 2009 10:59:47 -0700 (PDT) From: "Milosz Tylenda (JIRA)" To: dev@openjpa.apache.org Subject: [jira] Created: (OPENJPA-1153) Test suite speed-up outside SingleEMFTestCase MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 X-Virus-Checked: Checked by ClamAV on apache.org Test suite speed-up outside SingleEMFTestCase --------------------------------------------- Key: OPENJPA-1153 URL: https://issues.apache.org/jira/browse/OPENJPA-1153 Project: OpenJPA Issue Type: Test Affects Versions: 1.2.1, 1.1.0 Reporter: Milosz Tylenda Assignee: Milosz Tylenda Priority: Minor >From the developer list [1]: We have groups of tests which do not inherit from SingleEMFTestCase and use common persistence.xml files to do their setUp()s. Each persistence.xml contains all entities used by the group. An individual test uses its group's persistence.xml to set itself up although the test usually uses one or two entities. Not surprisingly getting database metadata and issuing DELETE TABLE statements often takes much more time than the actual test itself. The most notable example is a group of tests located in openjpa-persistence-jdbc/src/test/java/org/apache/openjpa/persistence/kernel/. Their openjpa-persistence-jdbc/src/test/resources/org/apache/openjpa/persistence/kernel/common/apps/META-INF/persistence.xml contains almost 100 entities. I measured how long does it take to run TestDateQueries which uses only one entity but sets itself up with that persistence xml. I ran the test suite with -Dtest=TestDateQueries and the necessary tables were already in the database: - Derby: 20 secs - MySQL: 12 secs - PostgreSQL: 46 secs Then I modified the persistence.xml to include only the entity used by the test. The timings for all databases dropped to around 4 seconds. My idea is to modify these tests (at least the ones taking the most time) and their superclass(-es) to not use persistence.xml but specify used entities as setUp() parameters, similarly to what SingleEMFTestCase. It looks like we would save at least a few minutes on a test suite run. [1] http://n2.nabble.com/Test-suite-speed-up-outside-SingleEMFTestCase-td3169383.html -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.