Author: orudyy
Date: Fri Jan 25 12:49:41 2013
New Revision: 1438479

URL: http://svn.apache.org/viewvc?rev=1438479&view=rev
Log:
QPID-4390: Fix messagestore.class.name settings in derby memory profiles. Fix 
tests from BrokerLoggingTest suite. Set DefaultMessageLogger for GenericActor 
before starting the broker

Modified:
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-10.testprofile
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-8.testprofile
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile
    
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9.testprofile

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/broker/src/main/java/org/apache/qpid/server/registry/ApplicationRegistry.java
 Fri Jan 25 12:49:41 2013
@@ -102,6 +102,7 @@ public class ApplicationRegistry impleme
         BrokerActor actor = new BrokerActor(startupMessageLogger);
         CurrentActor.set(actor);
         CurrentActor.setDefault(actor);
+        GenericActor.setDefaultMessageLogger(_rootMessageLogger);
         try
         {
             logStartupMessages(CurrentActor.get());
@@ -125,7 +126,6 @@ public class ApplicationRegistry impleme
         }
 
         CurrentActor.setDefault(new BrokerActor(_rootMessageLogger));
-        GenericActor.setDefaultMessageLogger(_rootMessageLogger);
     }
 
     private void initialiseStatisticsReporting()

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BrokerLoggingTest.java
 Fri Jan 25 12:49:41 2013
@@ -101,7 +101,7 @@ public class BrokerLoggingTest extends A
             _monitor = new LogMonitor(_outputFile);
 
 
-            String configFilePath = _configFile.toString();
+            String configFilePath = getConfigPath();
 
             // Ensure we wait for TESTID to be logged
             waitAndFindMatches(TESTID);
@@ -137,6 +137,11 @@ public class BrokerLoggingTest extends A
         }
     }
 
+    private String getConfigPath()
+    {
+        return 
getPathRelativeToWorkingDirectory(getTestConfigFile(DEFAULT_PORT));
+    }
+
     /**
      * Description:
      * On startup the broker must report correctly report the log4j file in 
use. This is important as it can help diagnose why logging messages are not 
being reported.
@@ -251,7 +256,8 @@ public class BrokerLoggingTest extends A
         if (isJavaBroker() && isExternalBroker())
         {
             // Get custom -l value used during testing for the broker startup
-            String customLog4j = 
_brokerCommand.substring(_brokerCommand.indexOf("-l") + 2).trim();
+            String brokerCommand = getBrokerCommand(DEFAULT_PORT, "");
+            String customLog4j = 
brokerCommand.substring(brokerCommand.indexOf("-l") + 2).trim();
 
             String TESTID = "BRK-1007";
 

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
 Fri Jan 25 12:49:41 2013
@@ -23,7 +23,6 @@ package org.apache.qpid.server.logging;
 
 import junit.framework.AssertionFailedError;
 
-import org.apache.qpid.server.configuration.ServerConfiguration;
 
 import java.util.Arrays;
 import java.util.List;
@@ -110,23 +109,17 @@ public class VirtualHostLoggingTest exte
 
         // Wait for the correct VHT message to arrive.                         
        
         waitForMessage(VHT_PREFIX + "1002");
-        
+
         // Validate each vhost logs a closure
         List<String> results = findMatches(VHT_PREFIX + "1002");
-        
+
         try
         {
-            // Load VirtualHost list from file. 
-            ServerConfiguration configuration = new 
ServerConfiguration(_configFile);
-            configuration.initialise();
-            List<String> vhosts = 
Arrays.asList(configuration.getVirtualHostsNames());
-
-            assertEquals("Each vhost did not close their store.", 
vhosts.size(), results.size());
+            assertEquals("Each vhost did not close their store.", 1, 
results.size());
         }
         catch (AssertionFailedError afe)
         {
             dumpLogs(results, _monitor);
-
             throw afe;
         }
     }

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
 Fri Jan 25 12:49:41 2013
@@ -85,7 +85,7 @@ public class QpidBrokerTestCase extends 
     public static final String GUEST_PASSWORD = "guest";
 
     protected final static String QpidHome = System.getProperty("QPID_HOME");
-    protected final File _configFile = new 
File(System.getProperty("broker.config"));
+    private final File _configFile = new 
File(System.getProperty("broker.config"));
     protected File _logConfigFile = new 
File(System.getProperty("log4j.configuration"));
     protected final String _brokerStoreType = 
System.getProperty("broker.config-store-type", "json");
     protected static final Logger _logger = 
Logger.getLogger(QpidBrokerTestCase.class);
@@ -576,7 +576,7 @@ public class QpidBrokerTestCase extends 
         return file.replace(System.getProperty(QPID_HOME,"QPID_HOME") + 
"/","");
     }
 
-    private String relativeToWorkingDirectory(String file)
+    protected String getPathRelativeToWorkingDirectory(String file)
     {
         File configLocation = new File(file);
         File workingDirectory = new File(System.getProperty("user.dir"));
@@ -587,7 +587,7 @@ public class QpidBrokerTestCase extends 
     {
         // Specify the test config file
         String testConfig = getTestConfigFile(port);
-        String relative = relativeToWorkingDirectory(testConfig);
+        String relative = getPathRelativeToWorkingDirectory(testConfig);
         _logger.info("Saving test broker configuration at: " + testConfig);
 
         testConfiguration.save(new File(testConfig));

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-10.testprofile
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-10.testprofile?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-10.testprofile
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-10.testprofile
 Fri Jan 25 12:49:41 2013
@@ -25,7 +25,7 @@ broker.ready=BRK-1004
 broker.stopped=Exception
 qpid.broker_default_amqp_protocol_excludes=AMQP_1_0
 broker.virtualhosts-config=${QPID_HOME}/etc/virtualhosts-systests-derby-mem.xml
-messagestorefactory.class.name=org.apache.qpid.server.store.derby.DerbyMessageStoreFactory
+messagestore.class.name=org.apache.qpid.server.store.derby.DerbyMessageStore
 profile.excludes=JavaPersistentExcludes JavaDerbyExcludes Java010Excludes
 broker.clean.between.tests=true
 broker.persistent=true

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-8.testprofile
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-8.testprofile?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-8.testprofile
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-8.testprofile
 Fri Jan 25 12:49:41 2013
@@ -25,7 +25,7 @@ broker.ready=BRK-1004
 broker.stopped=Exception
 
qpid.broker_default_amqp_protocol_excludes=AMQP_1_0,AMQP_0_10,AMQP_0_9_1,AMQP_0_9
 broker.virtualhosts-config=${QPID_HOME}/etc/virtualhosts-systests-derby-mem.xml
-messagestorefactory.class.name=org.apache.qpid.server.store.derby.DerbyMessageStoreFactory
+messagestore.class.name=org.apache.qpid.server.store.derby.DerbyMessageStore
 profile.excludes=JavaPersistentExcludes JavaDerbyExcludes XAExcludes 
JavaPre010Excludes
 broker.clean.between.tests=true
 broker.persistent=true

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9-1.testprofile
 Fri Jan 25 12:49:41 2013
@@ -25,7 +25,7 @@ broker.ready=BRK-1004
 broker.stopped=Exception
 qpid.broker_default_amqp_protocol_excludes=AMQP_1_0,AMQP_0_10
 broker.virtualhosts-config=${QPID_HOME}/etc/virtualhosts-systests-derby-mem.xml
-messagestorefactory.class.name=org.apache.qpid.server.store.derby.DerbyMessageStoreFactory
+messagestore.class.name=org.apache.qpid.server.store.derby.DerbyMessageStore
 profile.excludes=JavaPersistentExcludes JavaDerbyExcludes XAExcludes 
JavaPre010Excludes
 broker.clean.between.tests=true
 broker.persistent=true

Modified: 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9.testprofile
URL: 
http://svn.apache.org/viewvc/qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9.testprofile?rev=1438479&r1=1438478&r2=1438479&view=diff
==============================================================================
--- 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9.testprofile
 (original)
+++ 
qpid/branches/java-broker-config-qpid-4390/qpid/java/test-profiles/java-dby-mem.0-9.testprofile
 Fri Jan 25 12:49:41 2013
@@ -25,7 +25,7 @@ broker.ready=BRK-1004
 broker.stopped=Exception
 qpid.broker_default_amqp_protocol_excludes=AMQP_1_0,AMQP_0_10,AMQP_0_9_1
 broker.virtualhosts-config=${QPID_HOME}/etc/virtualhosts-systests-derby-mem.xml
-messagestorefactory.class.name=org.apache.qpid.server.store.derby.DerbyMessageStoreFactory
+messagestore.class.name=org.apache.qpid.server.store.derby.DerbyMessageStore
 profile.excludes=JavaPersistentExcludes JavaDerbyExcludes XAExcludes 
JavaPre010Excludes
 broker.clean.between.tests=true
 broker.persistent=true



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to