Skip to content

Commit

Permalink
refactor: Rename function to metadata_request_with_retry
Browse files Browse the repository at this point in the history
  • Loading branch information
carols10cents committed Jan 19, 2022
1 parent 18f62fc commit ade4aa3
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ impl BrokerConnector {
allow_auto_topic_creation: None,
};

let response = metadata_request_loop(broker_override, &request, backoff, self).await?;
let response = metadata_request_with_retry(broker_override, &request, backoff, self).await?;

// Since the metadata request contains information about the cluster state, use it to update our view.
self.topology.update(&response.brokers);
Expand Down Expand Up @@ -236,7 +236,7 @@ impl ArbitraryBrokerCache for &BrokerConnector {
}
}

async fn metadata_request_loop<A>(
async fn metadata_request_with_retry<A>(
broker_override: Option<Arc<A::C>>,
request_params: &MetadataRequest,
mut backoff: Backoff,
Expand Down Expand Up @@ -336,7 +336,7 @@ mod tests {
invalidate: Box::new(|| {}),
};

let result = metadata_request_loop(
let result = metadata_request_with_retry(
None,
&metadata_request,
Backoff::new(&Default::default()),
Expand All @@ -357,7 +357,7 @@ mod tests {
invalidate: Box::new(|| {}),
};

let result = metadata_request_loop(
let result = metadata_request_with_retry(
None,
&metadata_request,
Backoff::new(&Default::default()),
Expand Down Expand Up @@ -398,7 +398,7 @@ mod tests {
}),
};

let result = metadata_request_loop(
let result = metadata_request_with_retry(
None,
&metadata_request,
Backoff::new(&Default::default()),
Expand All @@ -421,7 +421,7 @@ mod tests {
invalidate: Box::new(|| unreachable!()),
};

let result = metadata_request_loop(
let result = metadata_request_with_retry(
broker_override,
&metadata_request,
Backoff::new(&Default::default()),
Expand All @@ -443,7 +443,7 @@ mod tests {
invalidate: Box::new(|| unreachable!()),
};

let result = metadata_request_loop(
let result = metadata_request_with_retry(
broker_override,
&metadata_request,
Backoff::new(&Default::default()),
Expand Down

0 comments on commit ade4aa3

Please sign in to comment.