Skip to content

Spring Kafka Wait For Assignment Failed After Update To SpringBoot 3.2.0 #2978

Closed
@dimasadryantos

Description

@dimasadryantos

Problem :

  • I have test where I configure multiple topics and have test container waiting for assignments, after updating to SpringBoot 3.2.0, my integration test freezing and returning :

Caused by: java.lang.IllegalStateException: Expected 2 but got 1 partitions

    @EventListener(ContextRefreshedEvent::class)
    fun waitForAssignment() {
        for (messageListenerContainer in kafkaListenerEndpointRegistry.listenerContainers) {
            if (shouldWaitForAssignment(messageListenerContainer)) {
                ContainerTestUtils.waitForAssignment(messageListenerContainer, embeddedKafka.partitionsPerTopic)
            }
        }
    }

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions