Fix spring-kafka latest dep tests (#4676)
This commit is contained in:
parent
63e9cfa257
commit
6c98ba6b2b
|
@ -215,14 +215,9 @@ class SpringKafkaInstrumentationTest extends AgentInstrumentationSpecification {
|
|||
.build()
|
||||
}
|
||||
|
||||
@KafkaListener(id = "testListener", topics = "testTopic", containerFactory = "batchFactory")
|
||||
void listener(List<ConsumerRecord<String, String>> records) {
|
||||
runInternalSpan("consumer")
|
||||
records.forEach({ record ->
|
||||
if (record.value() == "error") {
|
||||
throw new IllegalArgumentException("boom")
|
||||
}
|
||||
})
|
||||
@Bean
|
||||
Listener listener() {
|
||||
return new Listener()
|
||||
}
|
||||
|
||||
@Bean
|
||||
|
@ -241,4 +236,17 @@ class SpringKafkaInstrumentationTest extends AgentInstrumentationSpecification {
|
|||
factory
|
||||
}
|
||||
}
|
||||
|
||||
static class Listener {
|
||||
|
||||
@KafkaListener(id = "testListener", topics = "testTopic", containerFactory = "batchFactory")
|
||||
void listener(List<ConsumerRecord<String, String>> records) {
|
||||
runInternalSpan("consumer")
|
||||
records.forEach({ record ->
|
||||
if (record.value() == "error") {
|
||||
throw new IllegalArgumentException("boom")
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue