cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r602483 - in /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne: gen/ tools/
Date Sat, 08 Dec 2007 15:32:41 GMT
Author: aadamchik
Date: Sat Dec  8 07:32:40 2007
New Revision: 602483

URL: http://svn.apache.org/viewvc?rev=602483&view=rev
Log:
was getting some OutOfMemory errors on unit tests when doing refactoring... adding tearDown
cleanup code to address that

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTestBase.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ImportUtilsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskCrossMapRelationshipsTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/DeploymentConfiguratorTest.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTest.java?rev=602483&r1=602482&r2=602483&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTest.java
Sat Dec  8 07:32:40 2007
@@ -37,6 +37,12 @@
         cgen = new ClassGenerationInfo();
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        cgen = null;
+    }
+
     public void testFormatVariableName() {
         assertEquals("abc", cgen.formatVariableName("abc"));
 
@@ -85,7 +91,7 @@
                 return true;
             }
         };
-        
+
         cgen.entity.addRelationship(toMany);
         assertTrue(toMany.isToMany());
         assertTrue(cgen.isContainingListProperties());

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTestBase.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTestBase.java?rev=602483&r1=602482&r2=602483&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTestBase.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ClassGeneratorTestBase.java
Sat Dec  8 07:32:40 2007
@@ -36,6 +36,12 @@
         super.setUp();
         cgen = createGenerator();
     }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        cgen = null;
+    }
 
     protected abstract ClassGenerator createGenerator() throws Exception;
 

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ImportUtilsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ImportUtilsTest.java?rev=602483&r1=602482&r2=602483&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ImportUtilsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/gen/ImportUtilsTest.java
Sat Dec  8 07:32:40 2007
@@ -32,6 +32,12 @@
         super.setUp();
         importUtils = new ImportUtils();
     }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        importUtils = null;
+    }
 
     public void testSetPackageGeneratesPackageStatement() throws Exception {
         final String packageName = "org.myPackage";

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskCrossMapRelationshipsTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskCrossMapRelationshipsTest.java?rev=602483&r1=602482&r2=602483&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskCrossMapRelationshipsTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskCrossMapRelationshipsTest.java
Sat Dec  8 07:32:40 2007
@@ -46,6 +46,12 @@
         task.setTaskName("Test");
         task.setLocation(Location.UNKNOWN_LOCATION);
     }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        task = null;
+    }
 
     /**
      * Test pairs generation with a cross-DataMap relationship (v1.1).

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java?rev=602483&r1=602482&r2=602483&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/CayenneGeneratorTaskTest.java
Sat Dec  8 07:32:40 2007
@@ -72,6 +72,12 @@
         task.setLocation(Location.UNKNOWN_LOCATION);
     }
 
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        task = null;
+    }
+
     /** Test single classes with a non-standard template. */
     public void testSingleClassesCustTemplate() throws Exception {
         // prepare destination directory
@@ -267,25 +273,25 @@
                 "CayenneDataObject");
 
         // check embeddable results
-//        File e = new File(
-//                mapDir,
-//                convertPath("org/apache/cayenne/testdo/embeddable/Embeddable1.java"));
-//        assertTrue(e.isFile());
-//        assertContents(
-//                e,
-//                "Embeddable1",
-//                "org.apache.cayenne.testdo.embeddable",
-//                "_Embeddable1");
-//
-//        File _e = new File(
-//                mapDir,
-//                convertPath("org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java"));
-//        assertTrue(_e.exists());
-//        assertContents(
-//                _e,
-//                "_Embeddable1",
-//                "org.apache.cayenne.testdo.embeddable.auto",
-//                "Object");
+        // File e = new File(
+        // mapDir,
+        // convertPath("org/apache/cayenne/testdo/embeddable/Embeddable1.java"));
+        // assertTrue(e.isFile());
+        // assertContents(
+        // e,
+        // "Embeddable1",
+        // "org.apache.cayenne.testdo.embeddable",
+        // "_Embeddable1");
+        //
+        // File _e = new File(
+        // mapDir,
+        // convertPath("org/apache/cayenne/testdo/embeddable/auto/_Embeddable1.java"));
+        // assertTrue(_e.exists());
+        // assertContents(
+        // _e,
+        // "_Embeddable1",
+        // "org.apache.cayenne.testdo.embeddable.auto",
+        // "Object");
     }
 
     private String convertPath(String unixPath) {

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/DeploymentConfiguratorTest.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/DeploymentConfiguratorTest.java?rev=602483&r1=602482&r2=602483&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/DeploymentConfiguratorTest.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/test/java/org/apache/cayenne/tools/DeploymentConfiguratorTest.java
Sat Dec  8 07:32:40 2007
@@ -101,6 +101,14 @@
         assertSame(dest, task.getInfo().getDestJar());
         assertSame(src, task.getInfo().getSourceJar());
     }
+    
+    @Override
+    protected void tearDown() throws Exception {
+        super.tearDown();
+        task = null;
+        project = null;
+        dest = null;
+    }
 
     public void testPassThrough() throws Exception {
         // run task



Mime
View raw message