Skip to content

Commit

Permalink
Remove unnecessary comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pramithas committed Jan 23, 2025
1 parent 5399ac8 commit f706c5f
Showing 1 changed file with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -522,7 +522,6 @@ public void testConstructorWithSerializers() {
@Test
public void testNoSerializerProvided() {

// Test 1: No serializer provided in producerProps
Properties producerProps = new Properties();
producerProps.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9000");

Expand All @@ -532,10 +531,9 @@ public void testNoSerializerProvided() {
}
});

// Test 2: Invalid config (missing serializer)
final Map<String, Object> configs = new HashMap<>();
configs.put(ProducerConfig.BOOTSTRAP_SERVERS_CONFIG, "localhost:9999");

// Invalid value null for configuration key.serializer: must be non-null.
assertThrows(ConfigException.class, () -> {
try (KafkaProducer<String, String> producer = new KafkaProducer<>(configs)) {
// KafkaProducer will be closed automatically after the block
Expand Down

0 comments on commit f706c5f

Please sign in to comment.