geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dwo...@apache.org
Subject svn commit: r701572 - in /geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console: DBManagerTest.java DatabasePoolTest.java
Date Fri, 03 Oct 2008 23:56:56 GMT
Author: dwoods
Date: Fri Oct  3 16:56:55 2008
New Revision: 701572

URL: http://svn.apache.org/viewvc?rev=701572&view=rev
Log:
GERONIMO-4225 ported updated datasource and database Run SQL tests from trunk

Modified:
    geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
    geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java

Modified: geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java?rev=701572&r1=701571&r2=701572&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
(original)
+++ geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DBManagerTest.java
Fri Oct  3 16:56:55 2008
@@ -22,6 +22,9 @@
 import org.testng.annotations.Test;
 import org.apache.geronimo.testsupport.console.ConsoleTestSupport;
 
+/**
+ * @version $Rev$ $Date$
+ */
 @Test
 public class DBManagerTest extends ConsoleTestSupport {
     @Test
@@ -35,16 +38,14 @@
             selenium.click("//input[@value = 'Create']");
             selenium.waitForPageToLoad("30000");
             assertTrue(selenium.isTextPresent("MyUniqueDB"));
-            selenium.type("sqlStmts", "create table myTable ( id int primary key );");
-            selenium.select("useDB", "label=SystemDatabase");
             selenium.select("useDB", "label=MyUniqueDB");
+            selenium.type("sqlStmts", "create table myTable ( id int primary key );");
             selenium.click("//input[@value = 'Run SQL']");
             selenium.waitForPageToLoad("30000");
             //selenium.click("link=Application");
             selenium.click("//a[contains(@href, 'db=MyUniqueDB')]");
             selenium.waitForPageToLoad("30000");
             assertTrue(selenium.isTextPresent("MYTABLE"));
-            selenium.select("deleteDB", "label=SystemDatabase");
             selenium.select("deleteDB", "label=MyUniqueDB");
             selenium.click("//input[@value = 'Delete']");
             selenium.waitForPageToLoad("30000");
@@ -55,4 +56,21 @@
             logout();
         }
     }
+    
+    @Test
+    public void testRunSQL() throws Exception {
+        try {
+            login();
+
+            selenium.click("link=DB Manager");
+            selenium.waitForPageToLoad("30000");
+            selenium.select("useDB", "label=SystemDatabase");
+            selenium.type("sqlStmts", "select * from SYS.SYSDEPENDS;");
+            selenium.click("//input[@value = 'Run SQL']");
+            selenium.waitForPageToLoad("30000");
+            assertTrue(selenium.isTextPresent("SQL command/s successful"));
+        } finally {
+            logout();
+        }
+    }
 }

Modified: geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java
URL: http://svn.apache.org/viewvc/geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java?rev=701572&r1=701571&r2=701572&view=diff
==============================================================================
--- geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java
(original)
+++ geronimo/server/branches/2.1/testsuite/console-testsuite/advanced/src/test/java/org/apache/geronimo/testsuite/console/DatabasePoolTest.java
Fri Oct  3 16:56:55 2008
@@ -22,6 +22,9 @@
 import org.testng.annotations.Test;
 import org.apache.geronimo.testsupport.console.ConsoleTestSupport;
 
+/**
+ * @version $Rev$ $Date$
+ */
 @Test
 public class DatabasePoolTest extends ConsoleTestSupport {
     @Test
@@ -51,6 +54,24 @@
             logout();
         }
     }
+
+    @Test
+    public void testRunSQLDS() throws Exception {
+        try {
+            login();
+            
+            selenium.click("link=Database Pools");
+            selenium.waitForPageToLoad("30000");
+            selenium.select("useDB", "label=SystemDatasource");
+            selenium.type("sqlStmts", "select * from SYS.SYSDEPENDS;");
+            selenium.click("//input[@value = 'Run SQL']");
+            selenium.waitForPageToLoad("30000");
+            assertTrue(selenium.isTextPresent("SQL command/s successful"));
+        } finally {
+            logout();
+        }
+    }
+
     /*
     // cannot test yet. jetty is having problems rending the page
     



Mime
View raw message