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()
|
.build()
|
||||||
}
|
}
|
||||||
|
|
||||||
@KafkaListener(id = "testListener", topics = "testTopic", containerFactory = "batchFactory")
|
@Bean
|
||||||
void listener(List<ConsumerRecord<String, String>> records) {
|
Listener listener() {
|
||||||
runInternalSpan("consumer")
|
return new Listener()
|
||||||
records.forEach({ record ->
|
|
||||||
if (record.value() == "error") {
|
|
||||||
throw new IllegalArgumentException("boom")
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ -241,4 +236,17 @@ class SpringKafkaInstrumentationTest extends AgentInstrumentationSpecification {
|
||||||
factory
|
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