Skip to content

Commit 7598d8c

Browse files
committed
test: cleanup
Signed-off-by: Alexis Asseman <[email protected]>
1 parent 63a1acb commit 7598d8c

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

tap-agent/src/tap/sender_account.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -405,21 +405,6 @@ impl Drop for SenderAccount {
405405
}
406406
}
407407

408-
#[cfg(test)]
409-
impl SenderAccount {
410-
pub async fn _tests_get_allocations_active(
411-
&self,
412-
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
413-
self.inner.allocations_active.lock().await
414-
}
415-
416-
pub async fn _tests_get_allocations_ineligible(
417-
&self,
418-
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
419-
self.inner.allocations_ineligible.lock().await
420-
}
421-
}
422-
423408
#[cfg(test)]
424409
mod tests {
425410

@@ -441,6 +426,21 @@ mod tests {
441426

442427
const DUMMY_URL: &str = "http://localhost:1234";
443428

429+
// To help with testing from other modules.
430+
impl SenderAccount {
431+
pub async fn _tests_get_allocations_active(
432+
&self,
433+
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
434+
self.inner.allocations_active.lock().await
435+
}
436+
437+
pub async fn _tests_get_allocations_ineligible(
438+
&self,
439+
) -> MutexGuard<'_, HashMap<Address, Arc<SenderAllocation>>> {
440+
self.inner.allocations_ineligible.lock().await
441+
}
442+
}
443+
444444
async fn create_sender_with_allocations(
445445
pgpool: PgPool,
446446
sender_aggregator_endpoint: String,

0 commit comments

Comments
 (0)