Skip to content
This repository has been archived by the owner on Feb 8, 2024. It is now read-only.

Commit

Permalink
cover more cases
Browse files Browse the repository at this point in the history
  • Loading branch information
xvello committed Nov 23, 2023
1 parent 3dd5b3c commit fc2ea91
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion capture/src/sink.rs
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ mod tests {
cluster.clear_request_errors(RDKafkaApiKey::Produce);
let err = [RDKafkaRespErr::RD_KAFKA_RESP_ERR_INVALID_PARTITIONS; 1];
cluster.request_errors(RDKafkaApiKey::Produce, &err);
match sink.send(event.clone()).await {
match sink.send_batch(vec![event.clone(), event.clone()]).await {
Err(CaptureError::RetryableSinkError) => {} // Expected
Err(err) => panic!("wrong error code {}", err),
Ok(()) => panic!("should have errored"),
Expand Down Expand Up @@ -388,5 +388,10 @@ mod tests {
Err(err) => panic!("wrong error code {}", err),
Ok(()) => panic!("should have errored"),
};
match sink.send_batch(vec![event.clone(), event.clone()]).await {
Err(CaptureError::RetryableSinkError) => {} // Expected
Err(err) => panic!("wrong error code {}", err),
Ok(()) => panic!("should have errored"),
};
}
}

0 comments on commit fc2ea91

Please sign in to comment.