Add extra integration test for vhost

This commit is contained in:
Dave Syer
2011-04-17 08:08:33 +01:00
parent 8f8291fe92
commit ec33331551

View File

@@ -51,6 +51,18 @@ public class CachingConnectionFactoryIntegrationTests {
}
@Test
public void testReceiveFromNonExistentVirtualHost() throws Exception {
connectionFactory.setVirtualHost("non-existent");
RabbitTemplate template = new RabbitTemplate(connectionFactory);
// Wrong vhost is very unfriendly to client - the exception has no clue (just an EOF)
exception.expect(AmqpIOException.class);
String result = (String) template.receiveAndConvert("foo");
assertEquals("message", result);
}
@Test
public void testSendAndReceiveFromVolatileQueueAfterImplicitRemoval() throws Exception {