db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1079693 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportTest.java
Date Wed, 09 Mar 2011 08:21:22 GMT
Author: kahatlen
Date: Wed Mar  9 08:21:21 2011
New Revision: 1079693

URL: http://svn.apache.org/viewvc?rev=1079693&view=rev
Log:
DERBY-5112: ImportExportTest depends on implicit ordering of test cases

Reset test tables between each test case.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportTest.java?rev=1079693&r1=1079692&r2=1079693&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportTest.java
Wed Mar  9 08:21:21 2011
@@ -99,6 +99,13 @@ public class ImportExportTest extends Ba
                 }
         };
 	}
+
+    /**
+     * Set up the test environment.
+     */
+    protected void setUp() throws Exception {
+        resetTables();
+    }
 	
 	public void testImportFromNonExistantFile() {
 		try {
@@ -131,32 +138,26 @@ public class ImportExportTest extends Ba
 	}
 	
 	public void testWithDefaultOptions() throws Exception {
-		resetTables();
         doImportAndExport(null, "T1", null, null, null);
 	}
 	
 	public void testWithCodeset() throws Exception {
-		resetTables();
         doImportAndExport(null, "T1", null, null, "8859_1");
 	}
 
 	public void testDelimiterAndCodeset() throws Exception {
-		resetTables();
         doImportAndExport(null, "T1", "\t", "|", "8859_1");
 	}
 	
 	public void testSpecialDelimitersAndCodeset() throws Exception {
-		resetTables();
         doImportAndExport(null, "T1", "%", "&", "Cp1252");
 	}
 
 	public void testSpecialDelimitersAndUTF16() throws Exception {
-		resetTables();
         doImportAndExport(null, "T1", "%", "&", "UTF-16");
 	}
 	
 	public void testInvalidEncoding() throws Exception {
-		resetTables();
 		try {
             doImportAndExport(null, "T1", "^", "#", "INAVALID ENCODING");
             fail();
@@ -180,7 +181,6 @@ public class ImportExportTest extends Ba
      * with the same name exists in a different schema (DERBY-3296).
      */
     public void testImportWithSameNameInDifferentSchema() throws Exception {
-        resetTables();
         doExport(null, "T1", null, null, null);
         Statement s = createStatement();
         s.executeUpdate("create table otherschema.t2(x int)");
@@ -199,8 +199,6 @@ public class ImportExportTest extends Ba
      * are handled properly (DERBY-4042).
      */
     public void testQuotesInArguments() throws Exception {
-        resetTables();
-
         // Create schema names and table names containing both single quotes
         // and double quotes to expose bugs both for internally generated
         // string literals (enclosed in single quotes) and SQL identifiers
@@ -283,8 +281,6 @@ public class ImportExportTest extends Ba
      */
     public void testCastingProblem() throws Exception
     {
-        resetTables();
-
         final String fileName = SupportFilesSetup.
                 getReadWrite("castCheck.dat").getPath();
 
@@ -409,7 +405,7 @@ public class ImportExportTest extends Ba
     }
 	
 	/**
-	 * Called from each fixture that verifies data in the table.
+	 * Called from {@link #setUp()}.
 	 * Ensures that the import and export operate on a consistent
 	 * set of data.
 	 */



Mime
View raw message