You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by er...@apache.org on 2011/10/08 13:32:20 UTC

svn commit: r1180356 - in /james/mailbox/trunk/spring: ./ src/main/resources/META-INF/org/apache/james/ src/test/java/org/apache/james/mailbox/spring/

Author: eric
Date: Sat Oct  8 11:32:20 2011
New Revision: 1180356

URL: http://svn.apache.org/viewvc?rev=1180356&view=rev
Log:
Let spring create the hbase conf (MAILBOX-133)

Modified:
    james/mailbox/trunk/spring/pom.xml
    james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox-hbase.xml
    james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox.xml
    james/mailbox/trunk/spring/src/test/java/org/apache/james/mailbox/spring/SpringMailboxTest.java

Modified: james/mailbox/trunk/spring/pom.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/spring/pom.xml?rev=1180356&r1=1180355&r2=1180356&view=diff
==============================================================================
--- james/mailbox/trunk/spring/pom.xml (original)
+++ james/mailbox/trunk/spring/pom.xml Sat Oct  8 11:32:20 2011
@@ -142,5 +142,16 @@
       <groupId>junit</groupId>
       <artifactId>junit</artifactId>
     </dependency>
+    <dependency>
+        <groupId>org.apache.hbase</groupId>
+        <artifactId>hbase</artifactId>
+        <type>test-jar</type>
+        <scope>test</scope>
+    </dependency>
+    <dependency>
+        <groupId>org.apache.hadoop</groupId>
+        <artifactId>hadoop-test</artifactId>
+        <scope>test</scope>
+    </dependency>
   </dependencies>
 </project>

Modified: james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox-hbase.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox-hbase.xml?rev=1180356&r1=1180355&r2=1180356&view=diff
==============================================================================
--- james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox-hbase.xml (original)
+++ james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox-hbase.xml Sat Oct  8 11:32:20 2011
@@ -29,9 +29,11 @@
      
     <!-- 
         This is the link to the HBase Cluster. You need to place a valid hbase 
-        config file on the classpath that will be pciked up by HBaseConfiguration.create().
+        config file on the classpath that will be picked up by HBaseConfiguration.create().
     -->
-    <bean id="hbase-conf" class="org.apache.hadoop.hbase.HBaseConfiguration" factory-method="create" />
+    <bean id="hbase-minicluster" class="org.apache.hadoop.hbase.HBaseTestingUtility" init-method="startMiniCluster" />
+
+    <bean id="hbase-conf" factory-bean="hbase-minicluster" factory-method="getConfiguration"/>
 
     <bean id="hbase-mailboxmanager" class="org.apache.james.mailbox.hbase.HBaseMailboxManager" init-method="init">
         <constructor-arg index="0" ref="hbase-sessionMapperFactory"/>

Modified: james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox.xml
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox.xml?rev=1180356&r1=1180355&r2=1180356&view=diff
==============================================================================
--- james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox.xml (original)
+++ james/mailbox/trunk/spring/src/main/resources/META-INF/org/apache/james/spring-mailbox.xml Sat Oct  8 11:32:20 2011
@@ -41,10 +41,7 @@
 -->
     <import resource="classpath:META-INF/org/apache/james/spring-mailbox-maildir.xml" />
     <import resource="classpath:META-INF/org/apache/james/spring-mailbox-memory.xml" />
-<!-- 
-    HBase temporary desactivated while mailbox-spring test fails
     <import resource="classpath:META-INF/org/apache/james/spring-mailbox-hbase.xml" />
--->
     <!-- 
       Mailbox Copier
      -->

Modified: james/mailbox/trunk/spring/src/test/java/org/apache/james/mailbox/spring/SpringMailboxTest.java
URL: http://svn.apache.org/viewvc/james/mailbox/trunk/spring/src/test/java/org/apache/james/mailbox/spring/SpringMailboxTest.java?rev=1180356&r1=1180355&r2=1180356&view=diff
==============================================================================
--- james/mailbox/trunk/spring/src/test/java/org/apache/james/mailbox/spring/SpringMailboxTest.java (original)
+++ james/mailbox/trunk/spring/src/test/java/org/apache/james/mailbox/spring/SpringMailboxTest.java Sat Oct  8 11:32:20 2011
@@ -18,6 +18,8 @@
  ****************************************************************/
 package org.apache.james.mailbox.spring;
 
+import java.io.IOException;
+
 import junit.framework.Assert;
 
 import org.apache.james.mailbox.copier.MailboxCopierImpl;
@@ -29,12 +31,12 @@ public class SpringMailboxTest {
     private static SpringMailbox springMailbox;
     
     @BeforeClass
-    public static void init() {
+    public static void beforeClass() {
         springMailbox = new SpringMailbox();
     }
     
     @Test
-    public void testGetBean() {
+    public void testGetBean() throws IOException {
         Assert.assertEquals(AnonymousAuthenticator.class.getName(), springMailbox.getBean("authenticator").getClass().getName());
         Assert.assertEquals(MailboxCopierImpl.class.getName(), springMailbox.getBean("mailboxcopier").getClass().getName());
     }



---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org