db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r587644 - in /db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests: master/ master/DerbyNet/ master/DerbyNetClient/ tests/lang/
Date Tue, 23 Oct 2007 20:17:28 GMT
Author: mamta
Date: Tue Oct 23 13:17:27 2007
New Revision: 587644

URL: http://svn.apache.org/viewvc?rev=587644&view=rev
Log:
Migrating change from trunk(revision 587553) into 10.3 for DERBY-3054. The commit comments
for trunk were as follows

DERBY-3054 

The non-junit test, synonym.sql, tests the synonym dependency. The particular test case 2
views dependent on it. 
Depending on the jvm being used, the 2 exceptions(with same sql state but different object
dependency in the sql 
message text) thrown for dependency might be in different order and that causes test failure.
In order to fix this, 
I have carved out that test from synonym.sql into a new junit test and since in junit test,
we can simply assert 
the sql state, the order of 2 exceptions does not matter. I will migrate this fix into Derby
10.3 soon. 

Added:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SynonymTest.java
  (props changed)
      - copied unchanged from r587553, db/derby/code/trunk/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SynonymTest.java
Modified:
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/synonym.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/synonym.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/synonym.out
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
    db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/synonym.sql

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/synonym.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/synonym.out?rev=587644&r1=587643&r2=587644&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/synonym.out
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNet/synonym.out
Tue Oct 23 13:17:27 2007
@@ -363,25 +363,6 @@
 ij> -- Previously compiled cached statement should get invalidated
 select * from mySynonym;
 ERROR 42X05: Table/View 'MYSYNONYM' does not exist.
-ij> create synonym mySyn for table1;
-0 rows inserted/updated/deleted
-ij> create view v1 as select * from mySyn;
-0 rows inserted/updated/deleted
-ij> create view v2 as select * from v1;
-0 rows inserted/updated/deleted
-ij> -- Drop synonym should fail since it is used in two views.
-drop synonym mySyn;
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V1' is dependent on that object. SQLSTATE: X0Y23: Operation 'DROP SYNONYM' cannot be performed
on object 'MYSYN' because VIEW 'V2' is dependent on that object.
-ij> drop view v2;
-0 rows inserted/updated/deleted
-ij> -- fail still
-drop synonym mySyn;
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V1' is dependent on that object.
-ij> drop view v1;
-0 rows inserted/updated/deleted
-ij> -- should pass
-drop synonym mySyn;
-0 rows inserted/updated/deleted
 ij> -- drop and recreate schema test
 create schema testSchema;
 0 rows inserted/updated/deleted

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/synonym.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/synonym.out?rev=587644&r1=587643&r2=587644&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/synonym.out
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/DerbyNetClient/synonym.out
Tue Oct 23 13:17:27 2007
@@ -363,25 +363,6 @@
 ij> -- Previously compiled cached statement should get invalidated
 select * from mySynonym;
 ERROR 42X05: Table/View 'MYSYNONYM' does not exist.
-ij> create synonym mySyn for table1;
-0 rows inserted/updated/deleted
-ij> create view v1 as select * from mySyn;
-0 rows inserted/updated/deleted
-ij> create view v2 as select * from v1;
-0 rows inserted/updated/deleted
-ij> -- Drop synonym should fail since it is used in two views.
-drop synonym mySyn;
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V1' is dependent on that object. SQLSTATE: X0Y23: Operation 'DROP SYNONYM' cannot be performed
on object 'MYSYN' because VIEW 'V2' is dependent on that object.
-ij> drop view v2;
-0 rows inserted/updated/deleted
-ij> -- fail still
-drop synonym mySyn;
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V1' is dependent on that object.
-ij> drop view v1;
-0 rows inserted/updated/deleted
-ij> -- should pass
-drop synonym mySyn;
-0 rows inserted/updated/deleted
 ij> -- drop and recreate schema test
 create schema testSchema;
 0 rows inserted/updated/deleted

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/synonym.out
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/synonym.out?rev=587644&r1=587643&r2=587644&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/synonym.out
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/master/synonym.out
Tue Oct 23 13:17:27 2007
@@ -372,26 +372,6 @@
 ij> -- Previously compiled cached statement should get invalidated
 select * from mySynonym;
 ERROR 42X05: Table/View 'MYSYNONYM' does not exist.
-ij> create synonym mySyn for table1;
-0 rows inserted/updated/deleted
-ij> create view v1 as select * from mySyn;
-0 rows inserted/updated/deleted
-ij> create view v2 as select * from v1;
-0 rows inserted/updated/deleted
-ij> -- Drop synonym should fail since it is used in two views.
-drop synonym mySyn;
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V1' is dependent on that object.
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V2' is dependent on that object.
-ij> drop view v2;
-0 rows inserted/updated/deleted
-ij> -- fail still
-drop synonym mySyn;
-ERROR X0Y23: Operation 'DROP SYNONYM' cannot be performed on object 'MYSYN' because VIEW
'V1' is dependent on that object.
-ij> drop view v1;
-0 rows inserted/updated/deleted
-ij> -- should pass
-drop synonym mySyn;
-0 rows inserted/updated/deleted
 ij> -- drop and recreate schema test
 create schema testSchema;
 0 rows inserted/updated/deleted

Propchange: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/SynonymTest.java
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java?rev=587644&r1=587643&r2=587644&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/_Suite.java
Tue Oct 23 13:17:27 2007
@@ -110,6 +110,7 @@
         suite.addTest(SpillHashTest.suite());
         suite.addTest(CaseExpressionTest.suite());
         suite.addTest(AggregateClassLoadingTest.suite());
+        suite.addTest(SynonymTest.suite());
 
         // Add the XML tests, which exist as a separate suite
         // so that users can "run all XML tests" easily.

Modified: db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/synonym.sql
URL: http://svn.apache.org/viewvc/db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/synonym.sql?rev=587644&r1=587643&r2=587644&view=diff
==============================================================================
--- db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/synonym.sql
(original)
+++ db/derby/code/branches/10.3/java/testing/org/apache/derbyTesting/functionTests/tests/lang/synonym.sql
Tue Oct 23 13:17:27 2007
@@ -15,6 +15,8 @@
 --   limitations under the License.
 --
 -- tests for synonym support
+-- When we decide to convert this test to junit test, the converted tests can 
+-- go in existing SynonymTest.java
 
 set schema APP;
 -- negative tests
@@ -228,23 +230,6 @@
 
 -- Previously compiled cached statement should get invalidated
 select * from mySynonym;
-
-create synonym mySyn for table1;
-create view v1 as select * from mySyn;
-create view v2 as select * from v1;
-
--- Drop synonym should fail since it is used in two views.
-drop synonym mySyn;
-
-drop view v2;
-
--- fail still
-drop synonym mySyn;
-
-drop view v1;
-
--- should pass
-drop synonym mySyn;
 
 -- drop and recreate schema test
 create schema testSchema;



Mime
View raw message