db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kmars...@apache.org
Subject svn commit: r638422 - /db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
Date Tue, 18 Mar 2008 15:51:28 GMT
Author: kmarsden
Date: Tue Mar 18 08:51:22 2008
New Revision: 638422

URL: http://svn.apache.org/viewvc?rev=638422&view=rev
Log:
Port test changes for DERBY-3160 (590720), to avoid authentication errors in 
AuthenticationTest, PoolDSAuthenticationTest and XADSAuthenticationTest with 
10.4


Modified:
    db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java

Modified: db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java?rev=638422&r1=638421&r2=638422&view=diff
==============================================================================
--- db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
(original)
+++ db/derby/code/branches/10.3.2.1_test/java/testing/org/apache/derbyTesting/functionTests/tests/jdbcapi/AuthenticationTest.java
Tue Mar 18 08:51:22 2008
@@ -223,6 +223,7 @@
         for (int i = 1; i < USERS.length; i++)
         {          
             String jdbcUserName = USERS[i];
+            
             boolean delimited = jdbcUserName.charAt(0) == '"';
             String normalUserName;
             if (delimited)
@@ -254,8 +255,8 @@
             connUser.close();
             
             psGetAccess.setString(1, normalUserName);
-            //JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(),
-            //        "READONLYACCESS");
+            JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(),
+                    "READONLYACCESS");
             commit();
             
             // clear the property.
@@ -269,8 +270,8 @@
             connUser.close(); 
             
             psGetAccess.setString(1, normalUserName);
-            //JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(),
-            //        "FULLACCESS");
+            JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(),
+                    "FULLACCESS");
             commit();
             
             
@@ -290,8 +291,8 @@
             connUser.close();
             
             psGetAccess.setString(1, normalUserName);
-            //JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(),
-            //        "READONLYACCESS");
+            JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(),
+                    "READONLYACCESS");
             commit();           
 
         }
@@ -732,19 +733,19 @@
         
         PreparedStatement psGetAccess = conn1.prepareStatement(
                 "VALUES SYSCS_UTIL.SYSCS_GET_USER_ACCESS(?)");
-        psGetAccess.setString(1, "jamie");
+        psGetAccess.setString(1, "JAMIE");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
         
         psGetAccess.setString(1, "DAN");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
         
-        psGetAccess.setString(1, "system");
+        psGetAccess.setString(1, "SYSTEM");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
         
         psGetAccess.setString(1, "AMES");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "READONLYACCESS");
         
-        psGetAccess.setString(1, "mickEy");
+        psGetAccess.setString(1, "MICKEY");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "READONLYACCESS");
 
         // unknown user
@@ -765,13 +766,13 @@
         psGetAccess.setString(1, "AMES");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
         
-        psGetAccess.setString(1, "miCKEY");
+        psGetAccess.setString(1, "MICKEY");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "READONLYACCESS");
-        psGetAccess.setString(1, "jamie");
+        psGetAccess.setString(1, "JAMIE");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");      

         psGetAccess.setString(1, "DAN");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");      
 
-        psGetAccess.setString(1, "system");
+        psGetAccess.setString(1, "SYSTEM");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
 
         // and change AMES back again
@@ -782,13 +783,13 @@
         psGetAccess.setString(1, "AMES");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "READONLYACCESS");
         
-        psGetAccess.setString(1, "miCKEY");
+        psGetAccess.setString(1, "MICKEY");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "READONLYACCESS");
-        psGetAccess.setString(1, "jamie");
+        psGetAccess.setString(1, "JAMIE");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");      

         psGetAccess.setString(1, "DAN");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");      
 
-        psGetAccess.setString(1, "system");
+        psGetAccess.setString(1, "SYSTEM");
         JDBC.assertSingleValueResultSet(psGetAccess.executeQuery(), "FULLACCESS");
 
         // add a new users in
@@ -903,13 +904,7 @@
         CallableStatement csSetAccess = conn1.prepareCall(
             "CALL SYSCS_UTIL.SYSCS_SET_USER_ACCESS(?, ?)"); 
         
-        // Clear out the properties to ensure we start afresh
-        setDatabaseProperty("derby.database.fullAccessUsers", 
-                null, conn1);
-        setDatabaseProperty("derby.database.readOnlyAccessUsers", 
-                null, conn1);
-        
-        csSetAccess.setString(1, "dan");
+        csSetAccess.setString(1, "DAN");
         csSetAccess.setString(2, "FULLACCESS");
         csSetAccess.execute();
 



Mime
View raw message