Skip to content

Commit 634fe12

Browse files
committed
refactor: remove commented code and unnecessary stop of handler in test
1 parent 5789b96 commit 634fe12

File tree

2 files changed

+3
-16
lines changed

2 files changed

+3
-16
lines changed

crates/tap-agent/src/agent/sender_account.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -605,12 +605,12 @@ impl Actor for SenderAccount {
605605
.set(config.trigger_value as f64);
606606

607607
let endpoint = Endpoint::new(sender_aggregator_endpoint.to_string())
608-
.unwrap()
608+
.expect("Failed to create an endpoint for the sender aggregator")
609609
.connect_timeout(config.rav_request_timeout);
610610

611611
let sender_aggregator = TapAggregatorClient::connect(endpoint)
612612
.await
613-
.unwrap()
613+
.expect("Failed to connect to the TapAggregator endpoint")
614614
.send_compressed(tonic::codec::CompressionEncoding::Zstd);
615615

616616
let state = State {

crates/tap-agent/src/agent/sender_allocation.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -597,14 +597,6 @@ impl SenderAllocationState {
597597
let response = self
598598
.sender_aggregator
599599
.aggregate_receipts(rav_request)
600-
// .request(
601-
// "aggregate_receipts",
602-
// rpc_params!(
603-
// "0.0", // TODO: Set the version in a smarter place.
604-
// valid_receipts,
605-
// previous_rav
606-
// ),
607-
// )
608600
.await
609601
.inspect_err(|status: &Status| {
610602
if status.code() == Code::DeadlineExceeded {
@@ -1167,7 +1159,7 @@ pub mod tests {
11671159
#[sqlx::test(migrations = "../../migrations")]
11681160
async fn test_trigger_rav_request(pgpool: PgPool) {
11691161
// Start a TAP aggregator server.
1170-
let (handle, aggregator_endpoint) = run_server(
1162+
let (_handle, aggregator_endpoint) = run_server(
11711163
0,
11721164
SIGNER.0.clone(),
11731165
vec![SIGNER.1].into_iter().collect(),
@@ -1264,10 +1256,6 @@ pub mod tests {
12641256
));
12651257

12661258
// Stop the TAP aggregator server.
1267-
handle.abort();
1268-
1269-
// Optionally, check if the task has been stopped
1270-
assert!(handle.is_finished());
12711259
}
12721260

12731261
#[sqlx::test(migrations = "../../migrations")]
@@ -1325,7 +1313,6 @@ pub mod tests {
13251313
))
13261314
}
13271315
}
1328-
13291316
let await_trigger = Arc::new(tokio::sync::Notify::new());
13301317
// Start a TAP aggregator server.
13311318
let aggregator_server = MockServer::start().await;

0 commit comments

Comments
 (0)