mirror of https://github.com/apache/activemq.git
RA connection factory - test prefetch is being set
git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1374958 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
e49f5d9ff8
commit
2027c87791
|
@ -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 ActiveMQConnectionFactoryTest extends TestCase {
|
|||
info.setServerUrl(url);
|
||||
info.setUserName(user);
|
||||
info.setPassword(pwd);
|
||||
info.setAllPrefetchValues(new Integer(100));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -70,6 +72,8 @@ public class ActiveMQConnectionFactoryTest extends TestCase {
|
|||
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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue