activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dej...@apache.org
Subject svn commit: r1374958 - /activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java
Date Mon, 20 Aug 2012 09:49:16 GMT
Author: dejanb
Date: Mon Aug 20 09:49:16 2012
New Revision: 1374958

URL: http://svn.apache.org/viewvc?rev=1374958&view=rev
Log:
RA connection factory - test prefetch is being set

Modified:
    activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java

Modified: activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java?rev=1374958&r1=1374957&r2=1374958&view=diff
==============================================================================
--- activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java
(original)
+++ activemq/trunk/activemq-ra/src/test/java/org/apache/activemq/ra/ActiveMQConnectionFactoryTest.java
Mon Aug 20 09:49:16 2012
@@ -23,6 +23,7 @@ import java.io.ObjectInputStream;
 import java.io.ObjectOutputStream;
 import javax.jms.Connection;
 import junit.framework.TestCase;
+import org.apache.activemq.ActiveMQConnection;
 
 /**
  *
@@ -48,6 +49,7 @@ public class ActiveMQConnectionFactoryTe
         info.setServerUrl(url);
         info.setUserName(user);
         info.setPassword(pwd);
+        info.setAllPrefetchValues(new Integer(100));
     }
 
     @Override
@@ -70,6 +72,8 @@ public class ActiveMQConnectionFactoryTe
         ois.close();
         
         Connection con = deserializedFactory.createConnection("defaultUser", "defaultPassword");
+        ActiveMQConnection connection = ((ActiveMQConnection)((ManagedConnectionProxy)con).getManagedConnection().getPhysicalConnection());
+        assertEquals(100, connection.getPrefetchPolicy().getQueuePrefetch());
         assertNotNull("Connection object returned by ActiveMQConnectionFactory.createConnection()
is null", con);
     }
 



Mime
View raw message