Skip to content

Commit 6c3c80f

Browse files
* Fix Flaky test
1 parent 11febbd commit 6c3c80f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/main/java/com/microsoft/azure/kusto/kafka/connect/sink/TopicPartitionWriter.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,13 @@ public void handleRollFile(SourceFile fileDescriptor) {
104104
continue;
105105
}
106106
}
107+
IngestionStatus ingestionStatus = null;
108+
if(ingestionResult!=null && ingestionResult.getIngestionStatusCollection()!=null
109+
&& !ingestionResult.getIngestionStatusCollection().isEmpty()){
110+
ingestionStatus = ingestionResult.getIngestionStatusCollection().get(0);
111+
}
107112
log.info("Kusto ingestion: file ({}) of size ({}) at current offset ({}) with status ({})",
108-
fileDescriptor.path, fileDescriptor.rawBytes, currentOffset, ingestionResult.getIngestionStatusCollection().get(0));
113+
fileDescriptor.path, fileDescriptor.rawBytes, currentOffset,ingestionStatus);
109114
this.lastCommittedOffset = currentOffset;
110115
return;
111116
} catch (IngestionServiceException exception) {

0 commit comments

Comments
 (0)