roller-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From snoopd...@apache.org
Subject svn commit: r332579 - in /incubator/roller/trunk: personal/testing/hibernate.cfg.xml tests/org/roller/business/PlanetManagerTest.java tests/org/roller/business/TestAll.java tests/org/roller/business/WeblogManagerTest.java
Date Fri, 11 Nov 2005 15:06:03 GMT
Author: snoopdave
Date: Fri Nov 11 07:05:59 2005
New Revision: 332579

URL: http://svn.apache.org/viewcvs?rev=332579&view=rev
Log:
all unit tests running (again)

Modified:
    incubator/roller/trunk/personal/testing/hibernate.cfg.xml
    incubator/roller/trunk/tests/org/roller/business/PlanetManagerTest.java
    incubator/roller/trunk/tests/org/roller/business/TestAll.java
    incubator/roller/trunk/tests/org/roller/business/WeblogManagerTest.java

Modified: incubator/roller/trunk/personal/testing/hibernate.cfg.xml
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/personal/testing/hibernate.cfg.xml?rev=332579&r1=332578&r2=332579&view=diff
==============================================================================
--- incubator/roller/trunk/personal/testing/hibernate.cfg.xml (original)
+++ incubator/roller/trunk/personal/testing/hibernate.cfg.xml Fri Nov 11 07:05:59 2005
@@ -1,30 +1,52 @@
 <?xml version='1.0' encoding='utf-8'?>
 <!DOCTYPE hibernate-configuration PUBLIC
-        "-//Hibernate/Hibernate Configuration DTD 2.0//EN"
-        "http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">
+        "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
 <hibernate-configuration>
     <session-factory name="java:comp/env/hibernate/SessionFactory">
+    
+        <!-- By default Roller uses a JNDI DataSource and the MySQLDialect 
         <property name="show_sql">false</property>
+        <property name="connection.datasource">java:comp/env/jdbc/rollerdb</property>
+        <property name="dialect">org.hibernate.dialect.MySQLDialect</property>
+        -->
+        <!--
+        If you want to use HSQLDB, PostgreSQL, DB2 or Derby, Oracle then use the right dialect
  
+        <property name="dialect">org.hibernate.dialect.HQLDBDialect</property>

+        <property name="dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+        <property name="dialect">org.hibernate.dialect.DB2Dialect</property>
+        <property name="dialect">org.hibernate.dialect.DerbyDialect</property>
+        <property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
+        -->
 
+        <!--
+        Turning this on gets rid of ANTLR dependency; 
+        See http://forum.hibernate.org/viewtopic.php?t=939468
+        <property name="hibernate.query.factory_class">org.hibernate.hql.classic.ClassicQueryTranslatorFactory</property>
+        -->
+        
         <property name="hibernate.connection.driver_class">org.hsqldb.jdbcDriver</property>
         <property name="hibernate.connection.url">jdbc:hsqldb:hsql://localhost:3219</property>
         <property name="hibernate.connection.username">sa</property>
         <property name="hibernate.connection.password"></property>
         <property name="hibernate.dialect">org.hibernate.dialect.HSQLDialect</property>
-<!--
+
+        <!--
+        Examples for configuring Hibernate to use the JDBC Driver Manager
+        
         <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
         <property name="hibernate.connection.url">
                         jdbc:mysql://localhost/roller?user=roller&amp;password=tiger</property>
         <property name="hibernate.connection.username">roller</property>
         <property name="hibernate.connection.password">tiger</property>
-        <property name="hibernate.dialect">net.sf.hibernate.dialect.MySQLDialect</property>
+        <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
 
         <property name="hibernate.connection.driver_class">org.postgresql.Driver</property>
         <property name="hibernate.connection.url">jdbc:postgresql://localhost/rollerdb</property>
         <property name="hibernate.connection.username">scott</property>
         <property name="hibernate.connection.password">tiger</property>
-        <property name="hibernate.dialect">net.sf.hibernate.dialect.PostgreSQLDialect</property>
--->
+        <property name="hibernate.dialect">org.hibernate.dialect.PostgreSQLDialect</property>
+        -->
 
         <mapping resource="org/roller/business/HitCountData.hbm.xml" />
         <mapping resource="org/roller/pojos/BookmarkData.hbm.xml" />
@@ -33,6 +55,10 @@
         <mapping resource="org/roller/pojos/FolderAssoc.hbm.xml" />
         <mapping resource="org/roller/pojos/FolderData.hbm.xml" />
         <mapping resource="org/roller/pojos/WeblogTemplate.hbm.xml" />
+        <mapping resource="org/roller/pojos/PingCategoryRestrictionData.hbm.xml" />
+        <mapping resource="org/roller/pojos/AutoPingData.hbm.xml" />
+        <mapping resource="org/roller/pojos/PingQueueEntryData.hbm.xml" />
+        <mapping resource="org/roller/pojos/PingTargetData.hbm.xml" />
         <mapping resource="org/roller/pojos/RefererData.hbm.xml" />
         <mapping resource="org/roller/pojos/RoleData.hbm.xml" />
         <mapping resource="org/roller/pojos/RollerConfigData.hbm.xml" />
@@ -43,13 +69,12 @@
         <mapping resource="org/roller/pojos/WeblogEntryData.hbm.xml" />
         <mapping resource="org/roller/pojos/WebsiteData.hbm.xml" />
         <mapping resource="org/roller/pojos/RollerPropertyData.hbm.xml" />
+        <mapping resource="org/roller/pojos/PermissionsData.hbm.xml" />
         <mapping resource="org/roller/pojos/PlanetConfigData.hbm.xml" />
         <mapping resource="org/roller/pojos/PlanetGroupData.hbm.xml" />
         <mapping resource="org/roller/pojos/PlanetEntryData.hbm.xml" />
         <mapping resource="org/roller/pojos/PlanetSubscriptionData.hbm.xml" />
         <mapping resource="org/roller/pojos/PlanetGroupSubscriptionAssoc.hbm.xml" />
-
-        <mapping resource="org/roller/pojos/PermissionsData.hbm.xml" />
-
+                
     </session-factory>
 </hibernate-configuration>

Modified: incubator/roller/trunk/tests/org/roller/business/PlanetManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/business/PlanetManagerTest.java?rev=332579&r1=332578&r2=332579&view=diff
==============================================================================
--- incubator/roller/trunk/tests/org/roller/business/PlanetManagerTest.java (original)
+++ incubator/roller/trunk/tests/org/roller/business/PlanetManagerTest.java Fri Nov 11 07:05:59
2005
@@ -377,11 +377,11 @@
                 PlanetGroupData group = planet.getGroup("test_handle");
                 assertNotNull(group);
     
-                List bigag = planet.getAggregation(group, 1000);
-                assertEquals(bigag.size(), count);
+                List bigag = planet.getAggregation(group, 30);
+                assertEquals(30, bigag.size());
                       
                 List littleag = planet.getAggregation(group, 10);
-                assertEquals(littleag.size(), count);
+                assertEquals(10, littleag.size());
                                   
                 planet.deleteGroup(group);
                 planet.deleteSubscription(sub1);

Modified: incubator/roller/trunk/tests/org/roller/business/TestAll.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/business/TestAll.java?rev=332579&r1=332578&r2=332579&view=diff
==============================================================================
--- incubator/roller/trunk/tests/org/roller/business/TestAll.java (original)
+++ incubator/roller/trunk/tests/org/roller/business/TestAll.java Fri Nov 11 07:05:59 2005
@@ -15,15 +15,15 @@
     public static Test suite()
     {
         TestSuite suite = new TestSuite();
-//        suite.addTest(WebsiteTest.suite());
-//        suite.addTest(ConfigManagerTest.suite());
-//        suite.addTest(PermissionsTest.suite());
-//        suite.addTest(UserManagerTest.suite());
-//        suite.addTest(WeblogManagerTest.suite());
-//        suite.addTest(RefererManagerTest.suite());
-//        suite.addTest(IndexManagerTest.suite());             
-//        suite.addTest(BookmarkManagerTest.suite());
-//        suite.addTest(FileManagerTest.suite());
+        suite.addTest(WebsiteTest.suite());
+        suite.addTest(ConfigManagerTest.suite());
+        suite.addTest(PermissionsTest.suite());
+        suite.addTest(UserManagerTest.suite());
+        suite.addTest(WeblogManagerTest.suite());
+        suite.addTest(RefererManagerTest.suite());
+        suite.addTest(IndexManagerTest.suite());             
+        suite.addTest(BookmarkManagerTest.suite());
+        suite.addTest(FileManagerTest.suite());
         suite.addTest(PlanetManagerTest.suite()); 
         return suite;
     }

Modified: incubator/roller/trunk/tests/org/roller/business/WeblogManagerTest.java
URL: http://svn.apache.org/viewcvs/incubator/roller/trunk/tests/org/roller/business/WeblogManagerTest.java?rev=332579&r1=332578&r2=332579&view=diff
==============================================================================
--- incubator/roller/trunk/tests/org/roller/business/WeblogManagerTest.java (original)
+++ incubator/roller/trunk/tests/org/roller/business/WeblogManagerTest.java Fri Nov 11 07:05:59
2005
@@ -236,7 +236,7 @@
     {
         getRoller().begin(UserData.SYSTEM_USER);
         WeblogManager wmgr = getRoller().getWeblogManager();
-        assertEquals(11, wmgr.getWeblogCategories(mWebsite).size());
+        assertEquals(10, wmgr.getWeblogCategories(mWebsite).size());
         getRoller().rollback();
     }    
     



Mime
View raw message