db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r679027 - in /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools: ImportExportBinaryDataTest.java ImportExportLobTest.java ImportExportTest.java
Date Wed, 23 Jul 2008 08:38:00 GMT
Author: kahatlen
Date: Wed Jul 23 01:38:00 2008
New Revision: 679027

URL: http://svn.apache.org/viewvc?rev=679027&view=rev
Log:
DERBY-3784: ImportExportTest doesn't detect lack of expected errors

Added calls to fail() to ensure that the tests fail if the expected
exceptions are not thrown.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportBinaryDataTest.java
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportLobTest.java
    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/ImportExportBinaryDataTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportBinaryDataTest.java?rev=679027&r1=679026&r2=679027&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportBinaryDataTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportBinaryDataTest.java
Wed Jul 23 01:38:00 2008
@@ -194,6 +194,7 @@
     {
         try {
             doExportTable("APP", "BIN_TAB", fileName, null, "9" , null);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }
@@ -201,12 +202,14 @@
         try {
             doExportQuery("select * from BIN_TAB", fileName,
                           "|", "f", null);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }
 	SupportFilesSetup.deleteFile(fileName);
         try {
             doExportTable("APP", "BIN_TAB", fileName, "B", null , null);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }
@@ -215,6 +218,7 @@
 
         try {
             doImportTable("APP", "BIN_TAB_IMP", fileName, "2", null, null, 0);
+            fail();
         } catch (SQLException e) {
              assertSQLState("XIE0J", e);
         }
@@ -222,6 +226,7 @@
         try {
             doImportData(null, "BIN_TAB_IMP", null, 
                          null,  fileName, null, "c", null, 1);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportLobTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportLobTest.java?rev=679027&r1=679026&r2=679027&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportLobTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/tools/ImportExportLobTest.java
Wed Jul 23 01:38:00 2008
@@ -395,6 +395,7 @@
         try {
             doExportTableLobsToExtFile("APP", "BOOKS", fileName, 
                                        null, "9" , null, lobsFileName);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }
@@ -406,6 +407,7 @@
         try {
             doExportQueryLobsToExtFile("select * from BOOKS", fileName,
                                        "|", "f", null, lobsFileName);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }
@@ -420,6 +422,7 @@
         try {
             doImportTableLobsFromExtFile("APP", "BOOKS_IMP", fileName, "2", 
                                          null, null, 0);
+            fail();
         } catch (SQLException e) {
              assertSQLState("XIE0J", e);
         }
@@ -427,6 +430,7 @@
         try {
             doImportDataLobsFromExtFile(null, "BOOKS_IMP", null, 
                                       null,  fileName, null, "c", null, 1);
+            fail();
         } catch (SQLException e) {
             assertSQLState("XIE0J", e);
         }
@@ -449,6 +453,7 @@
             doExportTableLobsToExtFile("APP", "BOOKS", fileName, 
                                        null, null , null, 
                                        null);
+            fail();
         }catch (SQLException e) {
             assertSQLState("XIE0Q", e);
         }
@@ -467,6 +472,7 @@
             // missing lob file, refered by the main import file.
             doImportTableLobsFromExtFile("APP", "BOOKS_IMP", fileName, 
                                          null, null, null, 0);
+            fail();
         }catch (SQLException e) {
             assertSQLState("XIE0P", e);
         }

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=679027&r1=679026&r2=679027&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 Jul 23 01:38:00 2008
@@ -90,6 +90,7 @@
 		try {
 			Connection c = getConnection();
 			doImport(c, "Z" , "T1" , null , null , null, 0);
+            fail();
 		} catch (SQLException e) {
 			assertSQLState("XIE04", e);
 		}
@@ -99,6 +100,7 @@
 		try {
 			Connection c = getConnection();
 			doImport(c, null, "T1" , null , null, null, 0);
+            fail();
 		} catch (SQLException e) {
 			assertSQLState("XIE05", e);
 		}
@@ -154,6 +156,7 @@
 		resetTables();
 		try {
 		    doImportAndExport(c, "T1", "^", "#", "INAVALID ENCODING");
+            fail();
 		} catch (SQLException e) {
 			assertSQLState("XIE0I", e);
 		}
@@ -163,6 +166,7 @@
 		Connection c = getConnection();
 		try {
 			doImportFromFile(c, "extin/EndOfFile.txt" , "T4" , null , null , "US-ASCII", 0);
+            fail();
 		} catch (SQLException e) {
 			assertSQLState("XIE0E", e);
 		}



Mime
View raw message