HI so i had a spring boot application very basic which was posting to kafka topic
I had an integration test witha container set up as follows:
<code> protected static final KafkaContainer KAFKA_CONTAINER =
new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.1")).withReuse();
</code>
<code> protected static final KafkaContainer KAFKA_CONTAINER =
new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.1")).withReuse();
</code>
protected static final KafkaContainer KAFKA_CONTAINER =
new KafkaContainer(DockerImageName.parse("confluentinc/cp-kafka").withTag("7.6.1")).withReuse();
What i noticed was that with reuse, the tests would take ages to run, 10 seconds or more. And sometimes they would fail on a normal run, but fine in debug. and would run fine in pipeline.
im not sure but as soon as i removed with reuse everything went super fast and it is all working fine. Any ideas why, btw i was runnign the tests locally as single test