move spring-jms-2.0 tests to java#11195
Conversation
| import org.springframework.context.annotation.AnnotationConfigApplicationContext; | ||
| import org.springframework.jms.core.JmsTemplate; | ||
|
|
||
| public class SpringListenerTest { |
There was a problem hiding this comment.
| public class SpringListenerTest { | |
| class SpringListenerTest { |
| AtomicReference<SpanData> producerSpan = new AtomicReference<>(); | ||
| testing.waitAndAssertSortedTraces( | ||
| orderByRootSpanKind(PRODUCER, CONSUMER), | ||
| trace -> { |
There was a problem hiding this comment.
Here and other places in this PR, you can extract a public method, and then simplify the code together with the following verification logic. Can refer to
There was a problem hiding this comment.
I think that in the original groovy test the assertions were copied from some other test file. If needed you can move the assertions for produce/receive/process spans to helper methods and share these assertions between tests (if that makes sense), see https://github.com/open-telemetry/opentelemetry-java-instrumentation/blob/main/instrumentation/spring/spring-kafka-2.7/javaagent/src/test/java/io/opentelemetry/javaagent/instrumentation/spring/kafka/v2_7/SpringKafkaTest.java for ideas.
237304c to
c5f791c
Compare
| import org.springframework.jms.config.DefaultJmsListenerContainerFactory; | ||
| import org.springframework.jms.config.JmsListenerContainerFactory; | ||
|
|
||
| class AbstractConfig { |
There was a problem hiding this comment.
| class AbstractConfig { | |
| abstract class AbstractConfig { |
No description provided.