Class NewTopicTest
java.lang.Object
org.apache.kafka.clients.admin.NewTopicTest
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidtestAssociationRoutedBySize(String name, String keyPayload, String valuePayload, org.apache.kafka.common.message.CreateTopicsRequestData.CreatableTopic expected) voidtestAssociationRoutedByUtf8ByteLength(String name, String multibyte, org.apache.kafka.common.message.CreateTopicsRequestData.CreatableTopic expected) Routing is by UTF-8 byte length, because that is what the protocol caps: a generated message writer throws "field is too long to be serialized" once a string exceeds 0x7fff bytes.voidvoidvoidvoidvoidvoidvoidvoidvoidvoid
-
Field Details
-
TEST_TOPIC
- See Also:
-
NUM_PARTITIONS
public static final int NUM_PARTITIONS- See Also:
-
REPLICATION_FACTOR
public static final short REPLICATION_FACTOR- See Also:
-
CLEANUP_POLICY_CONFIG_KEY
- See Also:
-
CLEANUP_POLICY_CONFIG_VALUE
- See Also:
-
BROKER_IDS
-
-
Constructor Details
-
NewTopicTest
public NewTopicTest()
-
-
Method Details
-
testConstructorWithPartitionsAndReplicationFactor
@Test public void testConstructorWithPartitionsAndReplicationFactor() -
testConstructorWithOptionalValues
@Test public void testConstructorWithOptionalValues() -
testConstructorWithReplicasAssignments
@Test public void testConstructorWithReplicasAssignments() -
testConfigsNotNull
@Test public void testConfigsNotNull() -
testConfigsNull
@Test public void testConfigsNull() -
testUnmodifiableReplicasAssignments
@Test public void testUnmodifiableReplicasAssignments() -
testConvertToCreatableTopicWithPartitionsAndReplicationFactor
@Test public void testConvertToCreatableTopicWithPartitionsAndReplicationFactor() -
testConvertToCreatableTopicWithReplicasAssignments
@Test public void testConvertToCreatableTopicWithReplicasAssignments() -
testToString
@Test public void testToString() -
testEqualsAndHashCode
@Test public void testEqualsAndHashCode() -
testAssociationRoutedBySize
-
testAssociationRoutedByUtf8ByteLength
@ParameterizedTest(name="{0}") @MethodSource("multibyteAssociationCases") public void testAssociationRoutedByUtf8ByteLength(String name, String multibyte, org.apache.kafka.common.message.CreateTopicsRequestData.CreatableTopic expected) Routing is by UTF-8 byte length, because that is what the protocol caps: a generated message writer throws "field is too long to be serialized" once a string exceeds 0x7fff bytes. A payload whose char count is under the limit but whose UTF-8 encoding exceeds it must go to the tagged field, and one comfortably under by bytes must not.
-