use of javax.jms.InvalidSelectorException in project qpid-broker-j by apache.
the class SelectorTest method invalidSelector.
@Test
public void invalidSelector() throws Exception {
Connection connection = getConnection();
Queue queue = createQueue(getTestName());
try {
Session session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);
try {
session.createConsumer(queue, INVALID_SELECTOR);
fail("Exception not thrown");
} catch (InvalidSelectorException e) {
// PASS
}
try {
session.createBrowser(queue, INVALID_SELECTOR);
fail("Exception not thrown");
} catch (InvalidSelectorException e) {
// PASS
}
} finally {
connection.close();
}
}
Aggregations