mirror of
https://github.com/spring-projects/spring-framework.git
synced 2026-09-17 16:39:29 +00:00
Simplify tests
This commit is contained in:
+5
-10
@@ -28,9 +28,8 @@ import jakarta.jms.MessageListener;
|
||||
import jakarta.jms.TextMessage;
|
||||
import org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory;
|
||||
import org.apache.activemq.artemis.junit.EmbeddedActiveMQExtension;
|
||||
import org.junit.jupiter.api.AfterEach;
|
||||
import org.junit.jupiter.api.AutoClose;
|
||||
import org.junit.jupiter.api.BeforeEach;
|
||||
import org.junit.jupiter.api.extension.RegisterExtension;
|
||||
import org.junit.jupiter.params.ParameterizedTest;
|
||||
import org.junit.jupiter.params.provider.Arguments;
|
||||
import org.junit.jupiter.params.provider.MethodSource;
|
||||
@@ -48,12 +47,14 @@ import static org.junit.jupiter.params.provider.Arguments.argumentSet;
|
||||
*/
|
||||
class MessageListenerContainerObservationTests {
|
||||
|
||||
@RegisterExtension
|
||||
@AutoClose("stop")
|
||||
EmbeddedActiveMQExtension server = new EmbeddedActiveMQExtension();
|
||||
|
||||
@AutoClose
|
||||
ActiveMQConnectionFactory connectionFactory;
|
||||
|
||||
TestObservationRegistry registry = TestObservationRegistry.create();
|
||||
|
||||
ActiveMQConnectionFactory connectionFactory;
|
||||
|
||||
@BeforeEach
|
||||
void setupServer() {
|
||||
@@ -145,10 +146,4 @@ class MessageListenerContainerObservationTests {
|
||||
);
|
||||
}
|
||||
|
||||
@AfterEach
|
||||
void shutdownServer() {
|
||||
connectionFactory.close();
|
||||
server.stop();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user