Package pw.avvero.test.kafka
Class ContainerTestUtils
java.lang.Object
pw.avvero.test.kafka.ContainerTestUtils
Utilities for testing listener containers. No hard references to container
classes are used to avoid circular project dependencies.
Based on
ContainerTestUtils- Since:
- 1.0.3
- Author:
- Gary Russell
-
Method Summary
Modifier and TypeMethodDescriptionstatic intwaitForAssignment(Object container, int partitions) Wait until the container has the required number of assigned partitions and return the actual number of assigned partitions.
-
Method Details
-
waitForAssignment
Wait until the container has the required number of assigned partitions and return the actual number of assigned partitions. This method has been modified from the original version: - The method now returns an integer representing the number of assigned partitions. - The method no longer throws an IllegalStateException if the actual number of assigned partitions does not match the expected number. Instead, it returns the actual count of assigned partitions.- Parameters:
container- the container.partitions- the number of partitions.- Returns:
- an integer value representing [описание возвращаемого значения].
- Throws:
IllegalStateException- if the operation cannot be completed (since 2.3.4) as expected.pw.avvero.test.kafka.ContainerTestUtils.ContainerTestUtilsException- if the call to the container's getAssignedPartitions() method fails.
-