yashmayya commented on code in PR #13375:
URL: https://github.com/apache/kafka/pull/13375#discussion_r1302582757
##########
core/src/test/java/kafka/testkit/KafkaClusterTestKit.java:
##########
@@ -139,14 +139,14 @@ public FaultHandler build(String name, boolean fatal,
Runnable action) {
public static class Builder {
private TestKitNodes nodes;
- private Map<String, String> configProps = new HashMap<>();
- private SimpleFaultHandlerFactory faultHandlerFactory = new
SimpleFaultHandlerFactory();
+ private final Map<String, Object> configProps = new HashMap<>();
+ private final SimpleFaultHandlerFactory faultHandlerFactory = new
SimpleFaultHandlerFactory();
public Builder(TestKitNodes nodes) {
this.nodes = nodes;
}
- public Builder setConfigProp(String key, String value) {
+ public Builder setConfigProp(String key, Object value) {
Review Comment:
This change was required to support `Password` type configs used in
`MirrorConnectorsIntegrationSSLTest`
##########
connect/mirror/src/test/java/org/apache/kafka/connect/mirror/integration/MirrorConnectorsIntegrationBaseTest.java:
##########
@@ -1093,14 +1090,11 @@ protected Producer<byte[], byte[]>
initializeProducer(EmbeddedConnectCluster clu
* @param records Records to send in one parallel batch
*/
protected void produceMessages(Producer<byte[], byte[]> producer,
List<ProducerRecord<byte[], byte[]>> records) {
- List<Future<RecordMetadata>> futures = new ArrayList<>();
- for (ProducerRecord<byte[], byte[]> record : records) {
- futures.add(producer.send(record));
- }
Timer timer = Time.SYSTEM.timer(RECORD_PRODUCE_DURATION_MS);
+
try {
- for (Future<RecordMetadata> future : futures) {
- future.get(timer.remainingMs(), TimeUnit.MILLISECONDS);
+ for (ProducerRecord<byte[], byte[]> record : records) {
+ producer.send(record).get(timer.remainingMs(),
TimeUnit.MILLISECONDS);
Review Comment:
`testReplicationWithEmptyPartition` was consistently timing out without this
change, although I haven't yet gotten around to debugging why exactly that was
the case..
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]