@Override public void afterAll(ExtensionContext context) { brokerRunningHolder.remove(); Store store = getStore(context); BrokerRunning brokerRunning = store.remove(BROKER_RUNNING_BEAN, BrokerRunning.class); if (brokerRunning != null) { brokerRunning.removeTestQueues(); } }
@Override public void afterAll(ExtensionContext context) { brokerRunningHolder.remove(); Store store = getStore(context); BrokerRunning brokerRunning = store.remove(BROKER_RUNNING_BEAN, BrokerRunning.class); if (brokerRunning != null) { brokerRunning.removeTestQueues(); } }
@Override public Object resolveParameter(ParameterContext parameterContext, ExtensionContext context) throws ParameterResolutionException { // in parent for method injection, Composite key causes a store miss BrokerRunning brokerRunning = getParentStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class) == null ? getStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class) : getParentStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class); Assert.state(brokerRunning != null, "Could not find brokerRunning instance"); Class<?> type = parameterContext.getParameter().getType(); return type.equals(ConnectionFactory.class) ? brokerRunning.getConnectionFactory() : brokerRunning; }
@Override public Object resolveParameter(ParameterContext parameterContext, ExtensionContext context) throws ParameterResolutionException { // in parent for method injection, Composite key causes a store miss BrokerRunning brokerRunning = getParentStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class) == null ? getStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class) : getParentStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class); Assert.state(brokerRunning != null, "Could not find brokerRunning instance"); Class<?> type = parameterContext.getParameter().getType(); return type.equals(ConnectionFactory.class) ? brokerRunning.getConnectionFactory() : brokerRunning; }
try { String[] queues = rabbit.queues(); BrokerRunning brokerRunning = getStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class); if (brokerRunning == null) { if (rabbit.management()) { Store store = getStore(context); store.put(BROKER_RUNNING_BEAN, brokerRunning); store.put("queuesToDelete", queues);
try { String[] queues = rabbit.queues(); BrokerRunning brokerRunning = getStore(context).get(BROKER_RUNNING_BEAN, BrokerRunning.class); if (brokerRunning == null) { if (rabbit.management()) { Store store = getStore(context); store.put(BROKER_RUNNING_BEAN, brokerRunning); store.put("queuesToDelete", queues);