db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kahat...@apache.org
Subject svn commit: r1170470 - /db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
Date Wed, 14 Sep 2011 08:22:20 GMT
Author: kahatlen
Date: Wed Sep 14 08:22:19 2011
New Revision: 1170470

URL: http://svn.apache.org/viewvc?rev=1170470&view=rev
Log:
DERBY-5409: GrantRevokeDDLTest fails under Java 7

Drop created schemas in test cases to prevent interference when
test cases run in a different order than the order in which they
appear in the source file.

Modified:
    db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java

Modified: db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java?rev=1170470&r1=1170469&r2=1170470&view=diff
==============================================================================
--- db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
(original)
+++ db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/GrantRevokeDDLTest.java
Wed Sep 14 08:22:19 2011
@@ -10370,14 +10370,9 @@ public final class GrantRevokeDDLTest ex
     //  recompile of trigger action, we will not loose the privilege
     //  requirements for the triggers
     public void testAlterTablePrivilegesIntace() throws Exception {
-        Statement st = createStatement();
-        ResultSet rs = null;
-        
         Connection user1Connection = openUserConnection("user1");
         Statement st_user1Connection = user1Connection.createStatement();
         
-        st = createStatement();
-        
         st_user1Connection.executeUpdate(
         		"create table user1.t11 (c111 int, c112 int, c113 int)");
         st_user1Connection.executeUpdate(
@@ -10486,6 +10481,9 @@ public final class GrantRevokeDDLTest ex
         		"drop table user1.t12");
         st_user1Connection.executeUpdate(
         		"drop table user1.t13");
+
+        st_user1Connection.executeUpdate("drop schema user1 restrict");
+        st_user2Connection.executeUpdate("drop schema user2 restrict");
     }
 
     // DERBY-5044 During alter table drop column, we recompile all the 
@@ -10496,14 +10494,9 @@ public final class GrantRevokeDDLTest ex
     //  and able to detect trigger dependencies even if they are created
     //  by a different user
     public void testAlterTableWithPrivileges() throws Exception {
-        Statement st = createStatement();
-        ResultSet rs = null;
-        
         Connection user1Connection = openUserConnection("user1");
         Statement st_user1Connection = user1Connection.createStatement();
         
-        st = createStatement();
-        
         st_user1Connection.executeUpdate(
         		"create table user1.t11 (c111 int, c112 int)");
         st_user1Connection.executeUpdate(
@@ -10560,6 +10553,9 @@ public final class GrantRevokeDDLTest ex
                 "drop table user1.t11");
         st_user1Connection.executeUpdate(
                 "drop table user1.t12");
+
+        st_user1Connection.executeUpdate("drop schema user1 restrict");
+        st_user2Connection.executeUpdate("drop schema user2 restrict");
     }
 
     



Mime
View raw message