mirror of https://github.com/apache/activemq.git
https://issues.apache.org/jira/browse/AMQ-5304 - providing test case
This commit is contained in:
parent
052d293143
commit
acf84b43e9
|
@ -23,7 +23,13 @@ import org.ops4j.pax.exam.Option;
|
|||
import org.ops4j.pax.exam.Configuration;
|
||||
import org.ops4j.pax.exam.junit.PaxExam;
|
||||
|
||||
import javax.jms.Connection;
|
||||
import javax.jms.Message;
|
||||
import javax.jms.Session;
|
||||
import javax.jms.TemporaryQueue;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(PaxExam.class)
|
||||
|
@ -63,4 +69,15 @@ public class ActiveMQBrokerFeatureTest extends AbstractJmsFeatureTest {
|
|||
assertEquals("got our message", nameAndPayload, consumeMessage(nameAndPayload));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testTemporaryDestinations() throws Throwable {
|
||||
Connection connection = getConnection();
|
||||
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
|
||||
TemporaryQueue temporaryQueue = session.createTemporaryQueue();
|
||||
session.createProducer(temporaryQueue).send(session.createTextMessage("TEST"));
|
||||
Message msg = session.createConsumer(temporaryQueue).receive(3000);
|
||||
assertNotNull("Didn't receive the message", msg);
|
||||
connection.close();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -62,6 +62,10 @@
|
|||
<authorizationEntry topic=">" read="admin" write="admin" admin="admin"/>
|
||||
<authorizationEntry topic="ActiveMQ.Advisory.>" read="admin" write="admin" admin="admin"/>
|
||||
</authorizationEntries>
|
||||
|
||||
<tempDestinationAuthorizationEntry>
|
||||
<tempDestinationAuthorizationEntry read="admin" write="admin" admin="admin"/>
|
||||
</tempDestinationAuthorizationEntry>
|
||||
</authorizationMap>
|
||||
</map>
|
||||
</authorizationPlugin>
|
||||
|
|
Loading…
Reference in New Issue