qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rgodf...@apache.org
Subject svn commit: r1771861 - in /qpid/java/trunk: systests/src/main/java/org/apache/qpid/test/utils/ systests/src/test/java/org/apache/qpid/server/stats/ systests/src/test/java/org/apache/qpid/systest/management/amqp/ systests/src/test/java/org/apache/qpid/t...
Date Tue, 29 Nov 2016 08:50:52 GMT
Author: rgodfrey
Date: Tue Nov 29 08:50:52 2016
New Revision: 1771861

URL: http://svn.apache.org/viewvc?rev=1771861&view=rev
Log:
QPID-7546 : StatisticsReportingTest, update other excludes

Modified:
    qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/stats/StatisticsReportingTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/amqp/AmqpManagementTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTest.java
    qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
    qpid/java/trunk/test-profiles/Java10BrokenTestsExcludes
    qpid/java/trunk/test-profiles/Java10Excludes
    qpid/java/trunk/test-profiles/Java10UninvestigatedTestsExcludes

Modified: qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
(original)
+++ qpid/java/trunk/systests/src/main/java/org/apache/qpid/test/utils/QpidBrokerTestCase.java
Tue Nov 29 08:50:52 2016
@@ -375,13 +375,28 @@ public class QpidBrokerTestCase extends
     public Connection getConnectionForVHost(String vhost)
             throws URLSyntaxException, NamingException, JMSException
     {
-        ConnectionURL curl = new AMQConnectionURL(((AMQConnectionFactory)getConnectionFactory()).getConnectionURLString());
-        curl.setVirtualHost(vhost);
-        curl = new AMQConnectionURL(curl.toString());
+        return getConnectionForVHost(vhost, GUEST_USERNAME, GUEST_PASSWORD);
+    }
+
+    public Connection getConnectionForVHost(String vhost, String username, String password)
+            throws URLSyntaxException, NamingException, JMSException
+    {
+
+        if(isBroker10())
+        {
+            return getConnectionFactory(Boolean.getBoolean(PROFILE_USE_SSL) ? "default.ssl"
: "default", vhost, "clientId").createConnection(username, password);
+        }
+        else
+        {
+            ConnectionURL curl =
+                    new AMQConnectionURL(((AMQConnectionFactory) getConnectionFactory()).getConnectionURLString());
+            curl.setVirtualHost("/"+vhost);
+            curl = new AMQConnectionURL(curl.toString());
 
-        curl.setUsername(GUEST_USERNAME);
-        curl.setPassword(GUEST_PASSWORD);
-        return getConnection(curl);
+            curl.setUsername(username);
+            curl.setPassword(password);
+            return getConnection(curl);
+        }
     }
 
 

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/stats/StatisticsReportingTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/stats/StatisticsReportingTest.java?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/stats/StatisticsReportingTest.java
(original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/server/stats/StatisticsReportingTest.java
Tue Nov 29 08:50:52 2016
@@ -25,18 +25,10 @@ import java.util.Map;
 
 import javax.jms.Connection;
 import javax.jms.Destination;
-import javax.jms.JMSException;
 import javax.jms.MessageProducer;
 import javax.jms.Session;
 import javax.jms.TextMessage;
 
-import org.apache.qpid.QpidException;
-import org.apache.qpid.client.AMQConnection;
-import org.apache.qpid.client.AMQDestination;
-import org.apache.qpid.client.AMQQueue;
-import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.client.BrokerDetails;
-import org.apache.qpid.exchange.ExchangeDefaults;
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.VirtualHostNode;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
@@ -60,7 +52,6 @@ public class StatisticsReportingTest ext
     protected Connection _conToVhost1, _conToVhost2, _conToVhost3;
     protected String _queueName = "statistics";
     protected Destination _queue;
-    protected String _brokerUrl;
     private long _startTestTime;
 
     @Override
@@ -82,13 +73,9 @@ public class StatisticsReportingTest ext
         super.setUp();
         _monitor = new LogMonitor(getOutputFile());
 
-        BrokerDetails brokerDetails = getBrokerDetailsFromDefaultConnectionUrl();
-        brokerDetails.setPort(getDefaultBroker().getAmqpPort());
-
-        _brokerUrl = brokerDetails.toString();
-        _conToVhost1 = new AMQConnection(_brokerUrl, USER, USER, "clientid", VHOST_NAME1);
-        _conToVhost2 = new AMQConnection(_brokerUrl, USER, USER, "clientid", VHOST_NAME2);
-        _conToVhost3 = new AMQConnection(_brokerUrl, USER, USER, "clientid", VHOST_NAME3);
+        _conToVhost1 = getConnectionForVHost(VHOST_NAME1, "admin", "admin");
+        _conToVhost2 = getConnectionForVHost(VHOST_NAME2, "admin", "admin");
+        _conToVhost3 = getConnectionForVHost(VHOST_NAME3, "admin", "admin");
 
         _conToVhost1.start();
         _conToVhost2.start();
@@ -161,7 +148,7 @@ public class StatisticsReportingTest ext
     private void sendUsing(Connection con, int number, int size) throws Exception
     {
         Session session = con.createSession(true, Session.SESSION_TRANSACTED);
-        createQueue(session);
+        _queue = createTestQueue(session, _queueName);
         MessageProducer producer = session.createProducer(_queue);
         String content = new String(new byte[size]);
         TextMessage msg = session.createTextMessage(content);
@@ -173,13 +160,4 @@ public class StatisticsReportingTest ext
         session.close();
     }
 
-    private void createQueue(Session session) throws QpidException, JMSException
-    {
-        _queue = new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME, _queueName);
-        if (!((AMQSession<?,?>) session).isQueueBound((AMQDestination) _queue))
-        {
-            ((AMQSession<?,?>) session).createQueue(_queueName, false, true, false,
null);
-            ((AMQSession<?,?>) session).declareAndBind((AMQDestination) new AMQQueue(ExchangeDefaults.DIRECT_EXCHANGE_NAME,
_queueName));
-        }
-    }
 }

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/amqp/AmqpManagementTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/amqp/AmqpManagementTest.java?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/amqp/AmqpManagementTest.java
(original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/systest/management/amqp/AmqpManagementTest.java
Tue Nov 29 08:50:52 2016
@@ -513,7 +513,7 @@ public class AmqpManagementTest extends
                    Collections.list(responseMessage.getPropertyNames()).contains("statusCode"));
         assertEquals("Incorrect response code", 201, responseMessage.getIntProperty("statusCode"));
         _connection.close();
-        _connection = getConnectionForVHost("/"+virtualHostName);
+        _connection = getConnectionForVHost(virtualHostName);
         setupSession();
 
         message = _session.createMapMessage();

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTest.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTest.java?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTest.java
(original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTest.java
Tue Nov 29 08:50:52 2016
@@ -24,7 +24,7 @@ import javax.jms.DeliveryMode;
 import javax.jms.JMSException;
 import javax.jms.Message;
 import javax.jms.MessageProducer;
-import javax.jms.Queue;
+import javax.jms.Topic;
 
 import org.apache.qpid.server.model.Broker;
 import org.apache.qpid.server.model.Session;
@@ -334,7 +334,7 @@ public class TransactionTimeoutTest exte
 
     private void checkTransactionCommittedOnNonRoutableQueueMessage(int deliveryMode) throws
JMSException, Exception
     {
-        Queue nonExisting = _psession.createQueue(getTestQueueName() + System.currentTimeMillis());
+        Topic nonExisting = _psession.createTopic(isBroker10() ? "amq.fanout/foo" : "ADDR:
amq.fanout/foo");
         MessageProducer producer = _psession.createProducer(nonExisting);
         Message message = _psession.createMessage();
         producer.send(message, deliveryMode, Message.DEFAULT_PRIORITY, Message.DEFAULT_TIME_TO_LIVE);

Modified: qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
URL: http://svn.apache.org/viewvc/qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
(original)
+++ qpid/java/trunk/systests/src/test/java/org/apache/qpid/test/unit/transacted/TransactionTimeoutTestCase.java
Tue Nov 29 08:50:52 2016
@@ -40,7 +40,6 @@ import junit.framework.TestCase;
 
 import org.apache.qpid.AMQException;
 import org.apache.qpid.client.AMQSession;
-import org.apache.qpid.configuration.ClientProperties;
 import org.apache.qpid.protocol.ErrorCodes;
 import org.apache.qpid.test.utils.QpidBrokerTestCase;
 import org.apache.qpid.util.LogMonitor;
@@ -88,15 +87,14 @@ public abstract class TransactionTimeout
         _monitor = new LogMonitor(getOutputFile());
 
         // Connect to broker
-        setTestClientSystemProperty(ClientProperties.MAX_PREFETCH_PROP_NAME, String.valueOf(1));
-        _con = getConnection();
+        _con = getConnectionWithPrefetch(1);
         _con.setExceptionListener(this);
         _con.start();
         
         // Create queue
         Session qsession = _con.createSession(true, Session.SESSION_TRANSACTED);
+        _queue = createTestQueue(qsession);
         _queue = qsession.createQueue(getTestQueueName());
-        qsession.close();
         
         // Create producer and consumer
         producer();
@@ -137,8 +135,10 @@ public abstract class TransactionTimeout
             msg.setIntProperty("i", i);
             _producer.send(msg);
         }
-
-        ((AMQSession<?, ?>)_psession).sync();
+        if(!isBroker10())
+        {
+            ((AMQSession<?, ?>)_psession).sync();
+        }
     }
     
     /**

Modified: qpid/java/trunk/test-profiles/Java10BrokenTestsExcludes
URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/Java10BrokenTestsExcludes?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/test-profiles/Java10BrokenTestsExcludes (original)
+++ qpid/java/trunk/test-profiles/Java10BrokenTestsExcludes Tue Nov 29 08:50:52 2016
@@ -25,25 +25,24 @@
 
 org.apache.qpid.client.TemporaryQueuePrefixTest#*
 
+// AMQP 1.0 allows more than one txn per session, so our mechanism of installing transaction
timeout tickers will need to change
+org.apache.qpid.test.unit.transacted.TransactionTimeoutTest#*
+org.apache.qpid.test.unit.transacted.TransactionTimeoutDisabledTest#*
 
-// Testing behaviour of changing the topic associated with a durable subscriber
 
+// Testing behaviour of changing the topic associated with a durable subscriber
 org.apache.qpid.test.unit.topic.TopicSessionTest#testSubscriptionNameReuseForDifferentTopicSingleConnection
 org.apache.qpid.test.unit.topic.TopicSessionTest#testSubscriptionNameReuseForDifferentTopicTwoConnections
 
 
 // somewhere in the process, the expiration time appears to be being modified (or we are
only using relative expiration)
-
 org.apache.qpid.systest.rest.PublishMessageRestTest#testPublishMessageWithPropertiesAndHeaders
 
 
 // the received message is being treated as an object message (because it lacks the necessary
JMS annotation?)
-
 org.apache.qpid.systest.rest.PublishMessageRestTest#testPublishMapMessage
 
-
 // Tests failing waiting for messages - needs investigation
-
 org.apache.qpid.test.unit.transacted.CommitRollbackTest#testSend2ThenCloseAfter1andTryAgain
 org.apache.qpid.test.unit.transacted.CommitRollbackTest#testRollbackSoak
 
@@ -52,7 +51,6 @@ org.apache.qpid.test.unit.basic.BytesMes
 
 // AmqpManagement at the broker level needs the client to support the request/response pattern
using local target names
 // (since the synthetic virtual host cannot create a temporary queue).  This will require
the client to support this
-
 org.apache.qpid.systest.management.amqp.AmqpManagementTest#testCreateQueueOnBrokerManagement
 org.apache.qpid.systest.management.amqp.AmqpManagementTest#testCreateBindingOnBrokerManagement
 org.apache.qpid.systest.management.amqp.AmqpManagementTest#testCreateConnectionOnBrokerManagement
@@ -64,7 +62,6 @@ org.apache.qpid.systest.management.amqp.
 // This test fails with error The underlying correlation-id is not binary and so can't be
returned
 // however the correlation id in the incoming message was set as byte[] so the issue is within
the conversion to
 // the InternalMessage and back
-
 org.apache.qpid.systest.management.amqp.AmqpManagementTest#testGetTypesOnVhostManagement
 
 

Modified: qpid/java/trunk/test-profiles/Java10Excludes
URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/Java10Excludes?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/test-profiles/Java10Excludes (original)
+++ qpid/java/trunk/test-profiles/Java10Excludes Tue Nov 29 08:50:52 2016
@@ -145,6 +145,11 @@ org.apache.qpid.server.message.MessagePr
 // Tests the interaction between the Broker's supported protocols and what the 0-x client
agrees to
 org.apache.qpid.server.SupportedProtocolVersionsTest#*
 
+// Tests the client setting of JMSXUserId and the client options to control that
+org.apache.qpid.test.client.message.JMSXUserIDTest#*
+
+
+
 
 
 

Modified: qpid/java/trunk/test-profiles/Java10UninvestigatedTestsExcludes
URL: http://svn.apache.org/viewvc/qpid/java/trunk/test-profiles/Java10UninvestigatedTestsExcludes?rev=1771861&r1=1771860&r2=1771861&view=diff
==============================================================================
--- qpid/java/trunk/test-profiles/Java10UninvestigatedTestsExcludes (original)
+++ qpid/java/trunk/test-profiles/Java10UninvestigatedTestsExcludes Tue Nov 29 08:50:52 2016
@@ -31,7 +31,6 @@ org.apache.qpid.client.prefetch.Prefetch
 org.apache.qpid.client.redelivered.RedeliveredMessageTest#*
 org.apache.qpid.client.SynchReceiveTest#*
 org.apache.qpid.client.SyncPublishTest#*
-org.apache.qpid.server.stats.StatisticsReportingTest#*
 org.apache.qpid.server.security.acl.ExternalACLTest#*
 org.apache.qpid.server.security.acl.ExhaustiveACLTest#*
 org.apache.qpid.server.queue.ProducerFlowControlTest#*
@@ -48,12 +47,8 @@ org.apache.qpid.test.client.message.JMSD
 org.apache.qpid.systest.rest.ConnectionRestTest#*
 org.apache.qpid.systest.rest.MessagesRestTest#*
 org.apache.qpid.transport.ConnectionEstablishmentTest#*
-org.apache.qpid.test.unit.transacted.TransactionTimeoutTest#*
-org.apache.qpid.test.unit.transacted.TransactionTimeoutDisabledTest#*
 org.apache.qpid.test.unit.topic.TopicPublisherTest#*
-org.apache.qpid.test.client.message.JMSXUserIDTest#*
 org.apache.qpid.systest.disttest.endtoend.EndToEndTest#*
-org.apache.qpid.systest.disttest.QpidQueueCreatorTest#*
 
 
 



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message