NO-JIRA Removing Wrong assertion

This commit is contained in:
Clebert Suconic 2018-05-01 21:06:39 -04:00
parent f8017d0674
commit 385e11117b
2 changed files with 3 additions and 41 deletions

View File

@ -390,24 +390,8 @@ public class ActiveMQActivation {
}
}
Thread threadTearDown = new Thread("TearDown/ActiveMQActivation") {
@Override
public void run() {
for (ActiveMQMessageHandler handler : handlersCopy) {
handler.teardown();
}
}
};
// We will first start a new thread that will call tearDown on all the instances, trying to graciously shutdown everything.
// We will then use the call-timeout to determine a timeout.
// if that failed we will then close the connection factory, and interrupt the thread
threadTearDown.start();
try {
threadTearDown.join(timeout);
} catch (InterruptedException e) {
// nothing to be done on this context.. we will just keep going as we need to send an interrupt to threadTearDown and give up
for (ActiveMQMessageHandler handler : handlersCopy) {
handler.teardown();
}
if (factory != null) {
@ -421,20 +405,6 @@ public class ActiveMQActivation {
factory = null;
}
if (threadTearDown.isAlive()) {
threadTearDown.interrupt();
try {
threadTearDown.join(5000);
} catch (InterruptedException e) {
// nothing to be done here.. we are going down anyways
}
if (threadTearDown.isAlive()) {
ActiveMQRALogger.LOGGER.threadCouldNotFinish(threadTearDown.toString());
}
}
nodes.clear();
lastReceived = false;
@ -548,9 +518,7 @@ public class ActiveMQActivation {
calculatedDestinationName = spec.getQueuePrefix() + calculatedDestinationName;
}
logger.debug("Unable to retrieve " + destinationName +
" from JNDI. Creating a new " + destinationType.getName() +
" named " + calculatedDestinationName + " to be used by the MDB.");
logger.debug("Unable to retrieve " + destinationName + " from JNDI. Creating a new " + destinationType.getName() + " named " + calculatedDestinationName + " to be used by the MDB.");
// If there is no binding on naming, we will just create a new instance
if (isTopic) {

View File

@ -33,7 +33,6 @@ import org.apache.activemq.artemis.core.server.Queue;
import org.apache.activemq.artemis.core.transaction.impl.XidImpl;
import org.apache.activemq.artemis.ra.ActiveMQResourceAdapter;
import org.apache.activemq.artemis.ra.inflow.ActiveMQActivationSpec;
import org.apache.activemq.artemis.tests.util.Wait;
import org.apache.activemq.artemis.utils.UUIDGenerator;
import org.junit.Test;
@ -147,11 +146,6 @@ public class ActiveMQMessageHandlerXATest extends ActiveMQRATestBase {
assertTrue(endpoint.interrupted);
assertNotNull(endpoint.lastMessage);
assertEquals(endpoint.lastMessage.getCoreMessage().getBodyBuffer().readString(), "teststring");
Binding binding = server.getPostOffice().getBinding(MDBQUEUEPREFIXEDSIMPLE);
Wait.waitFor(() -> getMessageCount((Queue) binding.getBindable()) == 1);
long messageCount = getMessageCount((Queue) binding.getBindable());
assertEquals(1, messageCount);
}
@Test