You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kg...@apache.org on 2011/02/08 17:16:56 UTC
svn commit: r1068464 [6/6] - in /qpid/branches/qpid-2935/qpid: ./ bin/ cpp/
cpp/bindings/ cpp/bindings/qmf2/examples/cpp/
cpp/bindings/qmf2/examples/python/ cpp/bindings/qmf2/examples/ruby/
cpp/bindings/qmf2/python/ cpp/bindings/qmf2/ruby/ cpp/bindings...
Modified: qpid/branches/qpid-2935/qpid/java/module.xml
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/module.xml?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/module.xml (original)
+++ qpid/branches/qpid-2935/qpid/java/module.xml Tue Feb 8 16:16:49 2011
@@ -18,10 +18,15 @@
- under the License.
-
-->
-<project name="module">
+<project name="module" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<import file="common.xml"/>
+ <path id="maven-ant-tasks.classpath" path="${project.root}/lib/maven-ant-tasks-2.1.1.jar" />
+ <typedef resource="org/apache/maven/artifact/ant/antlib.xml"
+ uri="antlib:org.apache.maven.artifact.ant"
+ classpathref="maven-ant-tasks.classpath" />
+
<map property="module" value="${basedir}" split="${path.separator}">
<globmapper from="${project.root}${file.separator}*" to="*"/>
</map>
@@ -74,6 +79,9 @@
<available property="module.etc.exists" file="${module.etc}"/>
<available property="module.bin.exists" file="${module.bin}"/>
+ <property name="module.source.jar"
+ location="${build.lib}/${project.name}-${module.name}-${project.version}-sources.jar"/>
+
<!-- module.depends and module.test.depends are supplied by the importing file -->
<property name="module.depends" value=""/>
<property name="module.test.depends" value=""/>
@@ -209,18 +217,34 @@
<target name="pom" depends="prepare" if="module.genpom">
<jython path="${mllib.dir}">
<args>
- <arg line="${project.root}/genpom"/>
- <arg line="-s ${project.root}/lib/poms"/>
- <arg line="-o ${build}/${module.name}.pom"/>
+ <arg line='"${project.root}/genpom"'/>
+ <arg line='-s "${project.root}/lib/poms"'/>
+ <arg line='-o "${build}/qpid-${module.name}.pom"'/>
+ <arg line="-u http://qpid.apache.org"/>
<arg line="-g org.apache.qpid"/>
- <arg line="-a ${module.name}"/>
<arg line="-v ${project.version}"/>
+ <arg line="-p qpid"/>
+ <arg line='-m "${module.depends}"'/>
+ <arg line="-a ${module.name}"/>
<arg line="${module.genpom.args}"/>
<arg line="${module.libs}"/>
</args>
</jython>
</target>
+ <target name="release-mvn" depends="pom" if="module.genpom" description="Install the artifacts into the local repository and prepare the release">
+ <antcall target="build"/>
+
+ <artifact:pom id="module.pom" file="${build}/qpid-${module.name}.pom"/>
+
+ <artifact:install file="${module.jar}" pomRefId="module.pom"/>
+
+ <artifact:deploy file="${module.jar}" pomRefId="module.pom">
+ <attach file="${module.source.jar}" classifier="sources"/>
+ <remoteRepository url="file://${module.release.base}/maven"/>
+ </artifact:deploy>
+ </target>
+
<target name="precompile"/>
<target name="compile" depends="prepare,precompile" description="compile sources">
@@ -228,7 +252,7 @@
<echo message="Targeting : ${java.target}" level="info"/>
<javac source="${java.source}" target="${java.target}"
- destdir="${module.classes}" debug="on" includeantruntime="false"
+ destdir="${module.classes}" debug="on" debuglevel="lines,vars,source" includeantruntime="false"
deprecation="${javac.deprecation}">
<compilerarg line="${javac.compiler.args}"/>
<src refid="module.src.path"/>
@@ -407,7 +431,7 @@
<target name="postbuild" description="run after a build"/>
- <target name="build" depends="jar,jar-tests,libs,copy-bin,copy-etc,postbuild" description="compile and copy resources into build tree"/>
+ <target name="build" depends="jar,jar-tests,jar-sources,libs,copy-bin,copy-etc,postbuild" description="compile and copy resources into build tree"/>
<target name="jar.manifest" depends="compile" if="module.manifest">
<jar destfile="${module.jar}" basedir="${module.classes}" manifest="${module.manifest}"/>
</target>
@@ -424,6 +448,17 @@
<jar destfile="${module.test.jar}" basedir="${module.test.classes}"/>
</target>
+ <target name="jar-sources" depends="prepare" description="create sources jar">
+ <jar destfile="${module.source.jar}">
+ <fileset dir="${project.root}/resources">
+ <include name="LICENSE"/>
+ <include name="NOTICE"/>
+ </fileset>
+ <fileset dir="${module.src}" includes="**/*.java"/>
+ <fileset dir="${module.precompiled}" includes="**/*.java"/>
+ </jar>
+ </target>
+
<target name="libs" description="copy dependencies into build tree">
<copylist todir="${build.lib}" dir="${project.root}" files="${module.libs}"/>
</target>
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MessageListenerTest.java Tue Feb 8 16:16:49 2011
@@ -20,12 +20,16 @@
*/
package org.apache.qpid.client;
+import org.apache.qpid.server.configuration.ServerConfiguration;
import org.apache.qpid.test.utils.QpidBrokerTestCase;
+import org.apache.qpid.util.LogMonitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.jms.Connection;
+import javax.jms.ExceptionListener;
+import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageConsumer;
import javax.jms.MessageListener;
@@ -46,14 +50,15 @@ import java.util.concurrent.TimeUnit;
* the message listener later the _synchronousQueue is just poll()'ed and the first message delivered the remaining
* messages will be left on the queue and lost, subsequent messages on the session will arrive first.
*/
-public class MessageListenerTest extends QpidBrokerTestCase implements MessageListener
+public class MessageListenerTest extends QpidBrokerTestCase implements MessageListener, ExceptionListener
{
private static final Logger _logger = LoggerFactory.getLogger(MessageListenerTest.class);
Context _context;
private static final int MSG_COUNT = 5;
- private int receivedCount = 0;
+ private int _receivedCount = 0;
+ private int _errorCount = 0;
private MessageConsumer _consumer;
private Connection _clientConnection;
private CountDownLatch _awaitMessages = new CountDownLatch(MSG_COUNT);
@@ -94,11 +99,14 @@ public class MessageListenerTest extends
protected void tearDown() throws Exception
{
- _clientConnection.close();
+ if (_clientConnection != null)
+ {
+ _clientConnection.close();
+ }
super.tearDown();
}
- public void testSynchronousRecieve() throws Exception
+ public void testSynchronousReceive() throws Exception
{
for (int msg = 0; msg < MSG_COUNT; msg++)
{
@@ -106,15 +114,15 @@ public class MessageListenerTest extends
}
}
- public void testSynchronousRecieveNoWait() throws Exception
+ public void testSynchronousReceiveNoWait() throws Exception
{
for (int msg = 0; msg < MSG_COUNT; msg++)
{
- assertTrue(_consumer.receiveNoWait() != null);
+ assertTrue("Failed to receive message " + msg, _consumer.receiveNoWait() != null);
}
}
- public void testAsynchronousRecieve() throws Exception
+ public void testAsynchronousReceive() throws Exception
{
_consumer.setMessageListener(this);
@@ -128,18 +136,17 @@ public class MessageListenerTest extends
{
// do nothing
}
- // Should have recieved all async messages
- assertEquals(MSG_COUNT, receivedCount);
+ // Should have received all async messages
+ assertEquals(MSG_COUNT, _receivedCount);
}
- public void testRecieveThenUseMessageListener() throws Exception
+ public void testReceiveThenUseMessageListener() throws Exception
{
-
_logger.error("Test disabled as initial receive is not called first");
// Perform initial receive to start connection
assertTrue(_consumer.receive(2000) != null);
- receivedCount++;
+ _receivedCount++;
// Sleep to ensure remaining 4 msgs end up on _synchronousQueue
Thread.sleep(1000);
@@ -157,8 +164,8 @@ public class MessageListenerTest extends
{
// do nothing
}
- // Should have recieved all async messages
- assertEquals(MSG_COUNT, receivedCount);
+ // Should have received all async messages
+ assertEquals(MSG_COUNT, _receivedCount);
_clientConnection.close();
@@ -172,14 +179,81 @@ public class MessageListenerTest extends
assertTrue(cons.receive(2000) == null);
}
+ /**
+ * Tests the case where the message listener throws an java.lang.Error.
+ *
+ */
+ public void testMessageListenerThrowsError() throws Exception
+ {
+ final String javaLangErrorMessageText = "MessageListener failed with java.lang.Error";
+ _clientConnection.setExceptionListener(this);
+
+ _awaitMessages = new CountDownLatch(1);
+
+ _consumer.setMessageListener(new MessageListener()
+ {
+ public void onMessage(Message message)
+ {
+ try
+ {
+ _logger.debug("onMessage called");
+ _receivedCount++;
+
+
+ throw new Error(javaLangErrorMessageText);
+ }
+ finally
+ {
+ _awaitMessages.countDown();
+ }
+ }
+ });
+
+
+ _logger.info("Waiting 3 seconds for message");
+ _awaitMessages.await(3000, TimeUnit.MILLISECONDS);
+
+ assertEquals("onMessage should have been called", 1, _receivedCount);
+ assertEquals("onException should NOT have been called", 0, _errorCount);
+
+ // Check that Error has been written to the application log.
+
+ LogMonitor _monitor = new LogMonitor(_outputFile);
+ assertTrue("The expected message not written to log file.",
+ _monitor.waitForMessage(javaLangErrorMessageText, LOGMONITOR_TIMEOUT));
+
+ if (_clientConnection != null)
+ {
+ try
+ {
+ _clientConnection.close();
+ }
+ catch (JMSException e)
+ {
+ // Ignore connection close errors for this test.
+ }
+ finally
+ {
+ _clientConnection = null;
+ }
+ }
+ }
+
public void onMessage(Message message)
{
- _logger.info("Received Message(" + receivedCount + "):" + message);
+ _logger.info("Received Message(" + _receivedCount + "):" + message);
- receivedCount++;
+ _receivedCount++;
_awaitMessages.countDown();
}
+ @Override
+ public void onException(JMSException e)
+ {
+ _logger.info("Exception received", e);
+ _errorCount++;
+ }
+
public static junit.framework.Test suite()
{
return new junit.framework.TestSuite(MessageListenerTest.class);
Propchange: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:443187-707694
/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:795950-829653
/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:805429-821809
+/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/client/MultipleJCAProviderRegistrationTest.java:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AbstractTestLogging.java Tue Feb 8 16:16:49 2011
@@ -20,19 +20,6 @@
*/
package org.apache.qpid.server.logging;
-import org.apache.qpid.server.configuration.ServerConfiguration;
-import org.apache.qpid.server.configuration.VirtualHostConfiguration;
-import org.apache.qpid.server.logging.actors.CurrentActor;
-import org.apache.qpid.server.logging.actors.TestLogActor;
-import org.apache.qpid.server.logging.subjects.AbstractTestLogSubject;
-import org.apache.qpid.server.registry.ApplicationRegistry;
-import org.apache.qpid.server.store.SkeletonMessageStore;
-import org.apache.qpid.server.util.InternalBrokerBaseCase;
-import org.apache.qpid.server.util.TestApplicationRegistry;
-import org.apache.qpid.server.virtualhost.VirtualHost;
-import org.apache.qpid.test.utils.QpidBrokerTestCase;
-import org.apache.qpid.util.LogMonitor;
-
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashMap;
@@ -40,6 +27,14 @@ import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
+import org.apache.commons.configuration.ConfigurationException;
+import org.apache.qpid.server.configuration.ServerConfiguration;
+import org.apache.qpid.server.logging.subjects.AbstractTestLogSubject;
+import org.apache.qpid.server.registry.ApplicationRegistry;
+import org.apache.qpid.server.util.InternalBrokerBaseCase;
+import org.apache.qpid.test.utils.QpidBrokerTestCase;
+import org.apache.qpid.util.LogMonitor;
+
/**
* Abstract superclass for logging test set up and utility methods.
*
@@ -50,7 +45,6 @@ public class AbstractTestLogging extends
public static final long DEFAULT_LOG_WAIT = 2000;
public static final String TEST_LOG_PREFIX = "MESSAGE";
protected LogMonitor _monitor;
- ServerConfiguration _serverConfiguration;
InternalBrokerBaseCase _configLoader;
@@ -61,61 +55,32 @@ public class AbstractTestLogging extends
super.setUp();
_monitor = new LogMonitor(_outputFile);
+ }
+ protected ServerConfiguration getServerConfig() throws ConfigurationException
+ {
+ ServerConfiguration _serverConfiguration;
if (isExternalBroker())
{
- _serverConfiguration = new ServerConfiguration(_configFile);
-
- _configLoader = new InternalBrokerBaseCase()
+ _serverConfiguration = new ServerConfiguration(_configFile)
{
@Override
- protected void createBroker() throws Exception
+ public void initialise() throws ConfigurationException
{
- setStarted(true);
- CurrentActor.set(new TestLogActor(new SystemOutMessageLogger()));
-
- // Prevent the InVM broker from logging and spoiling tests.
- _serverConfiguration.getConfig().setProperty(ServerConfiguration.STATUS_UPDATES, "off");
-
- setConfiguration(_serverConfiguration);
- setRegistry(new TestApplicationRegistry(getConfiguration())
- {
- /**
- * Create a virtualhost with a {@link org.apache.qpid.server.store.SkeletonMessageStore} instead
- * of the configured one, but remember the original configuration.
- */
- @Override
- public VirtualHost createVirtualHost(final VirtualHostConfiguration vhostConfig) throws Exception
- {
- String oldClass = vhostConfig.getMessageStoreClass();
- vhostConfig.setMessageStoreClass(SkeletonMessageStore.class.getName());
- VirtualHost host = super.createVirtualHost(vhostConfig);
- vhostConfig.setMessageStoreClass(oldClass);
- return host;
- }
- });
- ApplicationRegistry.initialise(getRegistry());
-
- }
-
- @Override
- protected void stopBroker()
- {
- ApplicationRegistry.remove();
+ //Overriding initialise to only setup the vhosts and not
+ //perform the ConfigurationPlugin setup, removing need for
+ //an ApplicationRegistry to be loaded.
+ setupVirtualHosts(getConfig());
}
};
-
- // Set the test name as this will be used to define some default queues
- // VirtualHost, use test as this is a default vhost name.
- _configLoader.setName("test");
-
- _configLoader.setUp();
+ _serverConfiguration.initialise();
}
else
{
_serverConfiguration = ApplicationRegistry.getInstance().getConfiguration();
}
+ return _serverConfiguration;
}
protected void setLogMessagePrefix()
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/AlertingTest.java Tue Feb 8 16:16:49 2011
@@ -132,6 +132,7 @@ public class AlertingTest extends Abstra
{
sendMessage(_session, _destination, _numMessages + 1);
_session.commit();
+ _connection.close();
stopBroker();
// Rest the monitoring clearing the current output file.
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/BindingLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -191,6 +191,16 @@ public class BindingLoggingTest extends
// and so unbind.
_session.createConsumer(_session.createTemporaryQueue()).close();
+ if(isBroker010())
+ {
+ //auto-delete is at session close for 0-10
+ _session.close();
+ }
+
+ //wait for the deletion messages to be logged
+ waitForMessage("BND-1002");
+
+ //gather all the BND messages
List<String> results = waitAndFindMatches(BND_PREFIX);
// We will have two binds as we bind all queues to the default exchange
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ChannelLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -75,7 +75,7 @@ public class ChannelLoggingTest extends
String log = getLogMessage(results, 0);
// MESSAGE [con:0(guest@anonymous(3273383)/test)/ch:1] CHN-1001 : Create
validateMessageID("CHN-1001", log);
- assertEquals("Incorrect Channel in actor:"+fromActor(log), 1, getChannelID(fromActor(log)));
+ assertEquals("Incorrect Channel in actor:"+fromActor(log), isBroker010()? 0 : 1, getChannelID(fromActor(log)));
if (isBroker08())
{
@@ -89,7 +89,7 @@ public class ChannelLoggingTest extends
log = getLogMessage(results, 0);
// MESSAGE [con:0(guest@anonymous(3273383)/test)/ch:1] CHN-1004 : Prefetch Size (bytes) {0,number} : Count {1,number}
validateMessageID("CHN-1004", log);
- assertEquals("Incorrect Channel in actor:"+fromActor(log), 1, getChannelID(fromActor(log)));
+ assertEquals("Incorrect Channel in actor:"+fromActor(log), isBroker010()? 0 : 1, getChannelID(fromActor(log)));
assertTrue("Prefetch Count not correct",getMessageString(fromMessage(log)).endsWith("Count "+PREFETCH));
}
@@ -306,7 +306,7 @@ public class ChannelLoggingTest extends
validateMessageID("CHN-1001", open);
validateMessageID("CHN-1003", close);
assertEquals("Message should be Close", "Close", getMessageString(fromMessage(close)));
- assertEquals("Incorrect Channel ID closed", 1, getChannelID(fromSubject(close)));
+ assertEquals("Incorrect Channel ID closed", isBroker010()? 0 : 1, getChannelID(fromSubject(close)));
assertEquals("Channel IDs should be the same", getChannelID(fromActor(open)), getChannelID(fromSubject(close)));
assertEquals("Connection IDs should be the same", getConnectionID(fromActor(open)), getConnectionID(fromSubject(close)));
}
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/ExchangeLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -21,6 +21,7 @@
package org.apache.qpid.server.logging;
import org.apache.qpid.client.AMQConnection;
+import org.apache.qpid.client.AMQSession_0_10;
import org.apache.qpid.framing.AMQFrame;
import org.apache.qpid.framing.AMQShortString;
import org.apache.qpid.framing.ExchangeDeleteBody;
@@ -65,7 +66,7 @@ public class ExchangeLoggingTest extends
_session = _connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
_type = "direct";
- _name = "testName";
+ _name = getTestQueueName()+ "-exchange";
_queue = _session.createQueue(_type + "://" + _name + "/queue/queue");
@@ -177,15 +178,24 @@ public class ExchangeLoggingTest extends
//Ignore broker startup messages
_monitor.reset();
+ //create the exchange by creating a consumer
_session.createConsumer(_queue);
- MethodRegistry_8_0 registry = new MethodRegistry_8_0();
+ //now delete the exchange
+ if(isBroker010())
+ {
+ ((AMQSession_0_10) _session).sendExchangeDelete(_name, false);
+ }
+ else
+ {
+ MethodRegistry_8_0 registry = new MethodRegistry_8_0();
- ExchangeDeleteBody body = registry.createExchangeDeleteBody(0, new AMQShortString(_name), false, true);
+ ExchangeDeleteBody body = registry.createExchangeDeleteBody(0, new AMQShortString(_name), false, true);
- AMQFrame exchangeDeclare = body.generateFrame(0);
+ AMQFrame exchangeDeclare = body.generateFrame(0);
- ((AMQConnection) _connection).getProtocolHandler().syncWrite(exchangeDeclare, ExchangeDeleteOkBody.class);
+ ((AMQConnection) _connection).getProtocolHandler().syncWrite(exchangeDeclare, ExchangeDeleteOkBody.class);
+ }
//Wait and ensure we get our last EXH-1002 msg
waitForMessage("EXH-1002");
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/MemoryMessageStoreLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -92,7 +92,7 @@ public class MemoryMessageStoreLoggingTe
results = waitAndFindMatches("MST-1001");
// Load VirtualHost list from file.
- List<String> vhosts = Arrays.asList(_serverConfiguration.getVirtualHosts());
+ List<String> vhosts = Arrays.asList(getServerConfig().getVirtualHosts());
assertEquals("Each vhost did not create a store.", vhosts.size(), results.size());
@@ -105,7 +105,7 @@ public class MemoryMessageStoreLoggingTe
String vhostName = AbstractTestLogSubject.getSlice("vh", result).substring(1);
// Get the store class used in the configuration for the virtualhost.
- String fullStoreName = _serverConfiguration.getVirtualHostConfig(vhostName).getMessageStoreClass();
+ String fullStoreName = getServerConfig().getVirtualHostConfig(vhostName).getMessageStoreClass();
// Get the Simple class name from the expected class name of o.a.q.s.s.MMS
String storeName = fullStoreName.substring(fullStoreName.lastIndexOf(".") + 1);
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/QueueLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -147,6 +147,12 @@ public class QueueLoggingTest extends Ab
// then close the consumer it will be autoDeleted.
_session.createConsumer(_session.createTemporaryQueue()).close();
+ if(isBroker010())
+ {
+ //auto-delete is at session close for 0-10
+ _session.close();
+ }
+
// Validation
//Ensure that we wait for the QUE log message
waitAndFindMatches("QUE-1002");
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/SubscriptionLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -181,7 +181,10 @@ public class SubscriptionLoggingTest ext
String message = getMessageString(fromMessage(log));
assertTrue("Browser not on log message:" + message, message.contains("Browser"));
- assertTrue("AutoClose not on log message:" + message, message.contains("AutoClose"));
+ if(!isBroker010())
+ {
+ assertTrue("AutoClose not on log message:" + message, message.contains("AutoClose"));
+ }
// Beacause it is an auto close and we have no messages on the queue we
// will get a close message
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/server/logging/VirtualHostLoggingTest.java Tue Feb 8 16:16:49 2011
@@ -68,7 +68,7 @@ public class VirtualHostLoggingTest exte
try
{
- List<String> vhosts = Arrays.asList(_serverConfiguration.getVirtualHosts());
+ List<String> vhosts = Arrays.asList(getServerConfig().getVirtualHosts());
assertEquals("Each vhost did not create a store.", vhosts.size(), results.size());
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/client/destination/AddressBasedDestinationTest.java Tue Feb 8 16:16:49 2011
@@ -93,7 +93,7 @@ public class AddressBasedDestinationTest
}
catch(JMSException e)
{
- assertTrue(e.getMessage().contains("The name supplied in the address " +
+ assertTrue(e.getCause().getCause().getMessage().contains("The name 'testQueue1' supplied in the address " +
"doesn't resolve to an exchange or a queue"));
}
@@ -121,7 +121,7 @@ public class AddressBasedDestinationTest
}
catch(JMSException e)
{
- assertTrue(e.getMessage().contains("The name supplied in the address " +
+ assertTrue(e.getCause().getCause().getMessage().contains("The name 'testQueue2' supplied in the address " +
"doesn't resolve to an exchange or a queue"));
}
@@ -156,7 +156,7 @@ public class AddressBasedDestinationTest
}
catch(JMSException e)
{
- assertTrue(e.getMessage().contains("The name 'testQueue3' supplied in the address " +
+ assertTrue(e.getCause().getCause().getMessage().contains("The name 'testQueue3' supplied in the address " +
"doesn't resolve to an exchange or a queue"));
}
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/AMQConnectionTest.java Tue Feb 8 16:16:49 2011
@@ -266,19 +266,22 @@ public class AMQConnectionTest extends Q
}
}
- public void testGetChannelID()
+ public void testGetChannelID() throws Exception
{
- int maxChannelID = 65536;
+ long maxChannelID = _connection.getMaximumChannelCount();
if (isBroker010())
{
- maxChannelID = Integer.MAX_VALUE+1;
+ //Usable numbers are 0 to N-1 when using 0-10
+ //and 1 to N for 0-8/0-9
+ maxChannelID = maxChannelID-1;
}
for (int j = 0; j < 3; j++)
{
- for (int i = 1; i < maxChannelID; i++)
+ int i = isBroker010() ? 0 : 1;
+ for ( ; i <= maxChannelID; i++)
{
int id = _connection.getNextChannelID();
- assertEquals("On iterartion "+j, i, id);
+ assertEquals("Unexpected number on iteration "+j, i, id);
_connection.deregisterSession(id);
}
}
Modified: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java (original)
+++ qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/unit/client/connection/ConnectionCloseTest.java Tue Feb 8 16:16:49 2011
@@ -47,7 +47,7 @@ public class ConnectionCloseTest extends
{
Map<Thread,StackTraceElement[]> before = Thread.getAllStackTraces();
- for (int i = 0; i < 500; i++)
+ for (int i = 0; i < 50; i++)
{
if ((i % 10) == 0)
{
@@ -81,7 +81,7 @@ public class ConnectionCloseTest extends
}
Map<Thread,StackTraceElement[]> after = Thread.getAllStackTraces();
-
+
Map<Thread,StackTraceElement[]> delta = new HashMap<Thread,StackTraceElement[]>(after);
for (Thread t : before.keySet())
{
@@ -90,9 +90,12 @@ public class ConnectionCloseTest extends
dumpStacks(delta);
+ int deltaThreshold = (isExternalBroker()? 1 : 2) //InVM creates more thread pools in the same VM
+ * (Runtime.getRuntime().availableProcessors() + 1) + 5;
+
assertTrue("Spurious thread creation exceeded threshold, " +
delta.size() + " threads created.",
- delta.size() < 10);
+ delta.size() < deltaThreshold);
}
private void dumpStacks(Map<Thread,StackTraceElement[]> map)
Propchange: qpid/branches/qpid-2935/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -2,4 +2,5 @@
/qpid/branches/0.5.x-dev/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:886720-886722
/qpid/branches/java-broker-0-10/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:795950-829653
/qpid/branches/java-network-refactor/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:805429-821809
+/qpid/trunk/qpid/java/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java:1061302-1068442
/qpid/trunk/qpid/systests/src/main/java/org/apache/qpid/test/utils/QpidTestCase.java:796646-796653
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1 +1,2 @@
/qpid/branches/0.5.x-dev/qpid/java/test-profiles:931179
+/qpid/trunk/qpid/java/test-profiles:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/java/test-profiles/08StandaloneExcludes
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/test-profiles/08StandaloneExcludes?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/test-profiles/08StandaloneExcludes (original)
+++ qpid/branches/qpid-2935/qpid/java/test-profiles/08StandaloneExcludes Tue Feb 8 16:16:49 2011
@@ -34,6 +34,6 @@ org.apache.qpid.test.client.queue.QueueP
// Those tests are written against the 0.10 path
org.apache.qpid.test.unit.message.UTF8Test#*
-org.apache.qpid.client.MessageListenerTest#testSynchronousRecieveNoWait
+org.apache.qpid.client.MessageListenerTest#testSynchronousReceiveNoWait
org.apache.qpid.test.unit.client.connection.ConnectionTest#testUnsupportedSASLMechanism
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/08StandaloneExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/08StandaloneExcludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/CPPExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/010Excludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/010Excludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/010Excludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/CPPExcludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/Excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/Excludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/Excludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/Excludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/Excludes:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/java/test-profiles/Java010Excludes
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/java/test-profiles/Java010Excludes?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/java/test-profiles/Java010Excludes (original)
+++ qpid/branches/qpid-2935/qpid/java/test-profiles/Java010Excludes Tue Feb 8 16:16:49 2011
@@ -40,26 +40,10 @@ org.apache.qpid.server.exchange.ReturnUn
// QPID-1727 , QPID-1726 :c++ broker does not support flow to disk on transient queues. Also it requries a persistent store impl. for Apache
org.apache.qpid.test.client.QueueBrowsingFlowToDiskTest#*
-// 0-10 Broker does not follow the same Logging convention as the Java broker
-org.apache.qpid.server.logging.AccessControlLoggingTest#*
-org.apache.qpid.server.logging.AlertingTest#*
-org.apache.qpid.server.logging.BindingLoggingTest#*
-org.apache.qpid.server.logging.BrokerLoggingTest#*
+// 0-10 and 0-9 connections dont generate the exact same logging due to protocol differences
org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartsFlowStopped
org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartConsumerFlowStarted
-org.apache.qpid.server.logging.ChannelLoggingTest#testChannelStartConsumerFlowStarted
-org.apache.qpid.server.logging.DerbyMessageStoreLoggingTest#*
-org.apache.qpid.server.logging.DurableQueueLoggingTest#*
-org.apache.qpid.server.logging.ExchangeLoggingTest#*
-org.apache.qpid.server.logging.ManagementLoggingTest#*
-org.apache.qpid.server.logging.MemoryMessageStoreLoggingTest#*
-org.apache.qpid.server.logging.QueueLoggingTest#*
-org.apache.qpid.server.logging.SubscriptionLoggingTest#*
-org.apache.qpid.server.logging.TransientQueueLoggingTest#*
-org.apache.qpid.server.logging.VirtualHostLoggingTest#*
-org.apache.qpid.server.logging.messages.*
-org.apache.qpid.server.logging.subjects.*
-org.apache.qpid.server.logging.actors.*
+org.apache.qpid.server.logging.SubscriptionLoggingTest#testSubscriptionSuspend
// 0-10 Broker does not have a JMX connection MBean
org.apache.qpid.management.jmx.ManagementActorLoggingTest#testConnectionCloseViaManagement
@@ -93,6 +77,5 @@ org.apache.qpid.test.unit.ack.RecoverTes
//Temporarily adding the following until the issues are sorted out.
//Should probably raise JIRAs for them.
org.apache.qpid.transport.network.mina.MINANetworkDriverTest#*
-org.apache.qpid.test.unit.basic.LargeMessageTest#*
org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testCreateExchange
org.apache.qpid.test.client.destination.AddressBasedDestinationTest#testBrowseMode
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/JavaExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/08Excludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/08Excludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/08Excludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/JavaExcludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/JavaStandaloneExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/08StandaloneExcludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/08StandaloneExcludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/08StandaloneExcludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/JavaStandaloneExcludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/JavaTransientExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/08TransientExcludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/08TransientExcludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/08TransientExcludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/JavaTransientExcludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/XAExcludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/XAExcludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/XAExcludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/XAExcludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/XAExcludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/clean-dir
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/clean-dir:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/clean-dir:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/clean-dir:805429-821809
+/qpid/trunk/qpid/java/test-profiles/clean-dir:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.async.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.async.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.async.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/cpp.async.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.cluster.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.cluster.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.cluster.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/cpp.cluster.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.noprefetch.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.noprefetch.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.noprefetch.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/cpp.noprefetch.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.ssl.excludes
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.ssl.excludes:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.ssl.excludes:805429-821809
+/qpid/trunk/qpid/java/test-profiles/cpp.ssl.excludes:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.ssl.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.ssl.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.ssl.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/cpp.ssl.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/cpp.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/cpp.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/cpp.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/cpp.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/cpp.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/default.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/default.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/default.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/default.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/default.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/java-derby.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/java-derby.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/java-derby.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/java-derby.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/java-derby.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/java.testprofile
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/java.testprofile:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/java.testprofile:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/java.testprofile:805429-821809
+/qpid/trunk/qpid/java/test-profiles/java.testprofile:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/log4j-test.xml
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -2,3 +2,4 @@
/qpid/branches/0.5.x-dev/qpid/java/test-profiles/log4j-test.xml:931179
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/log4j-test.xml:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/log4j-test.xml:805429-821809
+/qpid/trunk/qpid/java/test-profiles/log4j-test.xml:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/test-provider.properties
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/test-provider.properties:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/test-provider.properties:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/test-provider.properties:805429-821809
+/qpid/trunk/qpid/java/test-profiles/test-provider.properties:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/java/test-profiles/test_resources/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/incubator/qpid/trunk/qpid/java/test-profiles/test_resources:443187-726139
/qpid/branches/java-broker-0-10/qpid/java/test-profiles/test_resources:795950-829653
/qpid/branches/java-network-refactor/qpid/java/test-profiles/test_resources:805429-821809
+/qpid/trunk/qpid/java/test-profiles/test_resources:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/packaging/windows/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -2,3 +2,4 @@
/qpid/branches/0.6-release-windows-installer/packaging/windows:926803
/qpid/branches/0.6-release-windows-installer/qpid/packaging/windows:926803,926865,927233
/qpid/branches/java-network-refactor/qpid/packaging/windows:805429-825319
+/qpid/trunk/qpid/packaging/windows:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/python/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,3 +1,4 @@
/qpid/branches/0.5.x-dev/qpid/python:892761,894875
/qpid/branches/java-network-refactor/qpid/python:805429-825319
/qpid/branches/qmfv2/qpid/python:902858,902894
+/qpid/trunk/qpid/python:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/python/examples/api/spout
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,2 +1,3 @@
/qpid/branches/qmfv2/qpid/python/examples/api/spout:902858,902894
/qpid/branches/qpid.rnr/python/examples/api/spout:894071-896158
+/qpid/trunk/qpid/python/examples/api/spout:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/python/qpid/concurrency.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,2 +1,3 @@
/qpid/branches/qmfv2/qpid/python/qpid/concurrency.py:902858,902894
/qpid/branches/qpid.rnr/python/qpid/concurrency.py:894071-896158
+/qpid/trunk/qpid/python/qpid/concurrency.py:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/ruby/ext/sasl/extconf.rb
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -0,0 +1 @@
+/qpid/trunk/qpid/ruby/ext/sasl/extconf.rb:1061302-1068442
Propchange: qpid/branches/qpid-2935/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Feb 8 16:16:49 2011
@@ -1,2 +1,3 @@
/qpid/branches/qmfv2/qpid/python/tests_0-9/queue.py:902858,902894
/qpid/branches/qpid.rnr/python/tests_0-9/queue.py:894071-896158
+/qpid/trunk/qpid/tests/src/py/qpid_tests/broker_0_9/queue.py:1061302-1068442
Modified: qpid/branches/qpid-2935/qpid/tools/src/py/qmf-tool
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/tools/src/py/qmf-tool?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/tools/src/py/qmf-tool (original)
+++ qpid/branches/qpid-2935/qpid/tools/src/py/qmf-tool Tue Feb 8 16:16:49 2011
@@ -128,12 +128,16 @@ class Mcli(Cmd):
try:
self.dataObject.do_query(data)
except Exception, e:
+ if e.message.__class__ == qmf2.Data:
+ e = e.message.getProperties()
print "Exception in query command:", e
def do_call(self, data):
try:
self.dataObject.do_call(data)
except Exception, e:
+ if e.message.__class__ == qmf2.Data:
+ e = e.message.getProperties()
print "Exception in call command:", e
def do_clear(self, data):
@@ -306,7 +310,15 @@ class QmfData:
methodName = tokens[1]
args = []
for arg in tokens[2:]:
- if arg[0] == '{' or arg[0] == '[' or arg.isdigit():
+ ##
+ ## If the argument is a map, list, boolean, integer, or floating (one decimal point),
+ ## run it through the Python evaluator so it is converted to the correct type.
+ ##
+ ## TODO: use a regex for this instead of this convoluted logic
+ if arg[0] == '{' or arg[0] == '[' or arg == "True" or arg == "False" or \
+ ((arg.count('.') < 2 and (arg.count('-') == 0 or \
+ (arg.count('-') == 1 and arg[0] == '-')) and \
+ arg.replace('.','').replace('-','').isdigit())):
args.append(eval(arg))
else:
args.append(arg)
Modified: qpid/branches/qpid-2935/qpid/tools/src/py/qpid-config
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/tools/src/py/qpid-config?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/tools/src/py/qpid-config (original)
+++ qpid/branches/qpid-2935/qpid/tools/src/py/qpid-config Tue Feb 8 16:16:49 2011
@@ -25,6 +25,56 @@ import sys
import locale
from qmf.console import Session
+usage = """
+Usage: qpid-config [OPTIONS]
+ qpid-config [OPTIONS] exchanges [filter-string]
+ qpid-config [OPTIONS] queues [filter-string]
+ qpid-config [OPTIONS] add exchange <type> <name> [AddExchangeOptions]
+ qpid-config [OPTIONS] del exchange <name>
+ qpid-config [OPTIONS] add queue <name> [AddQueueOptions]
+ qpid-config [OPTIONS] del queue <name> [DelQueueOptions]
+ qpid-config [OPTIONS] bind <exchange-name> <queue-name> [binding-key]
+ <for type xml> [-f -|filename]
+ <for type header> [all|any] k1=v1 [, k2=v2...]
+ qpid-config [OPTIONS] unbind <exchange-name> <queue-name> [binding-key]"""
+
+description = """
+ADDRESS syntax:
+
+ [username/password@] hostname
+ ip-address [:<port>]
+
+Examples:
+
+$ qpid-config add queue q
+$ qpid-config add exchange direct d localhost:5672
+$ qpid-config exchanges 10.1.1.7:10000
+$ qpid-config queues guest/guest@broker-host:10000
+
+Add Exchange <type> values:
+
+ direct Direct exchange for point-to-point communication
+ fanout Fanout exchange for broadcast communication
+ topic Topic exchange that routes messages using binding keys with wildcards
+ headers Headers exchange that matches header fields against the binding keys
+ xml XML Exchange - allows content filtering using an XQuery
+
+
+Queue Limit Actions
+
+ none (default) - Use broker's default policy
+ reject - Reject enqueued messages
+ flow-to-disk - Page messages to disk
+ ring - Replace oldest unacquired message with new
+ ring-strict - Replace oldest message, reject if oldest is acquired
+
+Queue Ordering Policies
+
+ fifo (default) - First in, first out
+ lvq - Last Value Queue ordering, allows queue browsing
+ lvq-no-browse - Last Value Queue ordering, browsing clients may lose data"""
+
+
class Config:
def __init__(self):
self._recursive = False
@@ -85,7 +135,7 @@ class JHelpFormatter(IndentedHelpFormatt
return ""
def Usage():
- print "qpid-config: invalid arguments. Try $ qpid-config --help"
+ print usage
exit(-1)
def OptionsAndArguments(argv):
@@ -93,54 +143,6 @@ def OptionsAndArguments(argv):
global config
- usage = """
- Usage: qpid-config [OPTIONS]
- qpid-config [OPTIONS] exchanges [filter-string]
- qpid-config [OPTIONS] queues [filter-string]
- qpid-config [OPTIONS] add exchange <type> <name> [AddExchangeOptions]
- qpid-config [OPTIONS] del exchange <name>
- qpid-config [OPTIONS] add queue <name> [AddQueueOptions]
- qpid-config [OPTIONS] del queue <name> [DelQueueOptions]
- qpid-config [OPTIONS] bind <exchange-name> <queue-name> [binding-key]
- <for type xml> [-f -|filename]
- <for type header> [all|any] k1=v1 [, k2=v2...]
- qpid-config [OPTIONS] unbind <exchange-name> <queue-name> [binding-key]"""
-
- description = """
- ADDRESS syntax:
-
- [username/password@] hostname
- ip-address [:<port>]
-
- Examples:
-
- $ qpid-config add queue q
- $ qpid-config add exchange direct d localhost:5672
- $ qpid-config exchanges 10.1.1.7:10000
- $ qpid-config queues guest/guest@broker-host:10000
-
- Add Exchange <type> values:
-
- direct Direct exchange for point-to-point communication
- fanout Fanout exchange for broadcast communication
- topic Topic exchange that routes messages using binding keys with wildcards
- headers Headers exchange that matches header fields against the binding keys
- xml XML Exchange - allows content filtering using an XQuery
-
-
- Queue Limit Actions
-
- none (default) - Use broker's default policy
- reject - Reject enqueued messages
- flow-to-disk - Page messages to disk
- ring - Replace oldest unacquired message with new
- ring-strict - Replace oldest message, reject if oldest is acquired
-
- Queue Ordering Policies
-
- fifo (default) - First in, first out
- lvq - Last Value Queue ordering, allows queue browsing
- lvq-no-browse - Last Value Queue ordering, browsing clients may lose data"""
parser = OptionParser(usage=usage,
description=description,
@@ -264,7 +266,7 @@ def OptionsAndArguments(argv):
#
# accept -f followed by either
-# a filename or "-", for stdin. pull the bits into a string, to be
+# a filename or "-", for stdin. pull the bits into a string, to be
# passed to the xml binding.
#
def snarf_xquery_args():
@@ -278,7 +280,7 @@ def snarf_xquery_args():
res = f.read()
f.close()
return [True, res]
-
+
#
# look for "any"/"all" and grok the rest of argv into a map
#
@@ -303,7 +305,7 @@ class BrokerManager:
self.brokerName = None
self.qmf = None
self.broker = None
- self.mechanism = None
+ self.mechanism = None
def SetBroker(self, brokerUrl, mechanism):
self.url = brokerUrl
@@ -379,7 +381,7 @@ class BrokerManager:
if queue != None:
qname = queue.name
print " bind [%s] => %s" % (bind.bindingKey, qname)
-
+
def QueueList(self, filter):
queues = self.qmf.getObjects(_class="queue", _agent=self.brokerAgent)
@@ -540,7 +542,7 @@ class BrokerManager:
# this checks/imports the -f arg
[ok, xquery] = snarf_xquery_args()
_args = { "xquery" : xquery }
- else:
+ else:
if res.type == "headers":
[ok, op, kv] = snarf_header_args(args[3:])
_args = kv
@@ -657,4 +659,4 @@ def main(argv=None):
if __name__ == "__main__":
sys.exit(main())
-
+
Modified: qpid/branches/qpid-2935/qpid/tools/src/py/qpid-route
URL: http://svn.apache.org/viewvc/qpid/branches/qpid-2935/qpid/tools/src/py/qpid-route?rev=1068464&r1=1068463&r2=1068464&view=diff
==============================================================================
--- qpid/branches/qpid-2935/qpid/tools/src/py/qpid-route (original)
+++ qpid/branches/qpid-2935/qpid/tools/src/py/qpid-route Tue Feb 8 16:16:49 2011
@@ -26,6 +26,31 @@ import os
import locale
from qmf.console import Session, BrokerURL
+usage = """
+Usage: qpid-route [OPTIONS] dynamic add <dest-broker> <src-broker> <exchange> [tag] [exclude-list]
+ qpid-route [OPTIONS] dynamic del <dest-broker> <src-broker> <exchange>
+
+ qpid-route [OPTIONS] route add <dest-broker> <src-broker> <exchange> <routing-key> [tag] [exclude-list] [mechanism]
+ qpid-route [OPTIONS] route del <dest-broker> <src-broker> <exchange> <routing-key>
+ qpid-route [OPTIONS] queue add <dest-broker> <src-broker> <exchange> <queue>
+ qpid-route [OPTIONS] queue del <dest-broker> <src-broker> <exchange> <queue>
+ qpid-route [OPTIONS] route list [<dest-broker>]
+ qpid-route [OPTIONS] route flush [<dest-broker>]
+ qpid-route [OPTIONS] route map [<broker>]
+
+ qpid-route [OPTIONS] link add <dest-broker> <src-broker>
+ qpid-route [OPTIONS] link del <dest-broker> <src-broker>
+ qpid-route [OPTIONS] link list [<dest-broker>]"""
+
+description = """
+ADDRESS syntax:
+
+ [username/password@] hostname
+ ip-address [:<port>]"""
+
+def Usage():
+ print usage
+
class Config:
def __init__(self):
self._verbose = False
@@ -54,35 +79,7 @@ class JHelpFormatter(IndentedHelpFormatt
else:
return ""
-def usage(parser):
- parser.print_help()
- exit(-1)
-
-usage = """
-Usage: qpid-route [OPTIONS] dynamic add <dest-broker> <src-broker> <exchange> [tag] [exclude-list]
- qpid-route [OPTIONS] dynamic del <dest-broker> <src-broker> <exchange>
-
- qpid-route [OPTIONS] route add <dest-broker> <src-broker> <exchange> <routing-key> [tag] [exclude-list] [mechanism]
- qpid-route [OPTIONS] route del <dest-broker> <src-broker> <exchange> <routing-key>
- qpid-route [OPTIONS] queue add <dest-broker> <src-broker> <exchange> <queue>
- qpid-route [OPTIONS] queue del <dest-broker> <src-broker> <exchange> <queue>
- qpid-route [OPTIONS] route list [<dest-broker>]
- qpid-route [OPTIONS] route flush [<dest-broker>]
- qpid-route [OPTIONS] route map [<broker>]
-
- qpid-route [OPTIONS] link add <dest-broker> <src-broker>
- qpid-route [OPTIONS] link del <dest-broker> <src-broker>
- qpid-route [OPTIONS] link list [<dest-broker>]"""
-
-description = """
-ADDRESS syntax:
-
- [username/password@] hostname
- ip-address [:<port>]"""
-
-
def OptionsAndArguments(argv):
-
parser = OptionParser(usage=usage,
description=description,
formatter=JHelpFormatter())
@@ -472,7 +469,7 @@ class RoutePair:
self.bidir = True
return True
return False
-
+
def YN(val):
if val == 1:
@@ -485,7 +482,8 @@ def main(argv=None):
args = OptionsAndArguments(argv)
nargs = len(args)
if nargs < 2:
- usage(parser)
+ Usage()
+ return(-1)
if nargs == 2:
localBroker = socket.gethostname()
@@ -507,11 +505,13 @@ def main(argv=None):
if group == "link":
if cmd == "add":
if nargs != 4:
- usage(parser)
+ Usage()
+ return(-1)
rm.addLink(remoteBroker)
elif cmd == "del":
if nargs != 4:
- usage(parser)
+ Usage()
+ return(-1)
rm.delLink(remoteBroker)
elif cmd == "list":
rm.listLinks()
@@ -519,35 +519,39 @@ def main(argv=None):
elif group == "dynamic":
if cmd == "add":
if nargs < 5 or nargs > 7:
- usage(parser)
+ Usage()
+ return(-1)
tag = ""
excludes = ""
mech = "PLAIN"
- if nargs > 5: tag = args[5]
- if nargs > 6: excludes = args[6]
+ if nargs > 5: tag = args[5]
+ if nargs > 6: excludes = args[6]
rm.addRoute(remoteBroker, args[4], "", tag, excludes, mech, dynamic=True)
elif cmd == "del":
if nargs != 5:
- usage(parser)
+ Usage()
+ return(-1)
else:
rm.delRoute(remoteBroker, args[4], "", dynamic=True)
elif group == "route":
if cmd == "add":
if nargs < 6 or nargs > 9:
- usage(parser)
+ Usage()
+ return(-1)
tag = ""
excludes = ""
mech = "PLAIN"
- if nargs > 6: tag = args[6]
+ if nargs > 6: tag = args[6]
if nargs > 7: excludes = args[7]
if nargs > 8: mech = args[8]
rm.addRoute(remoteBroker, args[4], args[5], tag, excludes, mech, dynamic=False)
elif cmd == "del":
if nargs != 6:
- usage(parser)
+ Usage()
+ return(-1)
rm.delRoute(remoteBroker, args[4], args[5], dynamic=False)
elif cmd == "map":
rm.mapRoutes()
@@ -557,17 +561,20 @@ def main(argv=None):
elif cmd == "flush":
rm.clearAllRoutes()
else:
- usage(parser)
+ Usage()
+ return(-1)
elif group == "queue":
if nargs != 6:
- usage(parser)
+ Usage()
+ return(-1)
if cmd == "add":
rm.addQueueRoute(remoteBroker, exchange=args[4], queue=args[5])
elif cmd == "del":
rm.delQueueRoute(remoteBroker, exchange=args[4], queue=args[5])
else:
- usage(parser)
+ Usage()
+ return(-1)
except Exception,e:
if rm:
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org