FINERACT-1724: Closing JMS sessions explicitly to avoid memory leaking for multi external event producer
This commit is contained in:
committed by
Arnold Gálovics
parent
ae8ad4b689
commit
f0d2e9326d
+8
@@ -37,6 +37,7 @@ import org.apache.fineract.avro.MessageV1;
|
||||
import org.apache.fineract.infrastructure.core.config.FineractProperties;
|
||||
import org.apache.fineract.infrastructure.core.messaging.jms.MessageFactory;
|
||||
import org.apache.fineract.infrastructure.core.service.HashingService;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.Test;
|
||||
import org.junit.jupiter.api.extension.ExtendWith;
|
||||
@@ -109,6 +110,13 @@ class JMSMultiExternalEventProducerTest {
|
||||
given(session3.createProducer(destination)).willReturn(producer3);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
public void tearDown() throws Exception {
|
||||
verify(session1).close();
|
||||
verify(session2).close();
|
||||
verify(session3).close();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSendEventsShouldWork() throws Exception {
|
||||
// given
|
||||
|
||||
Reference in New Issue
Block a user