diff --git a/relay-server/src/services/buffer/envelope_store/mod.rs b/relay-server/src/services/buffer/envelope_store/mod.rs index e5a052b14b..0dce115473 100644 --- a/relay-server/src/services/buffer/envelope_store/mod.rs +++ b/relay-server/src/services/buffer/envelope_store/mod.rs @@ -28,9 +28,9 @@ pub trait EnvelopeStore { limit: i64, ) -> impl Future>, Self::Error>>; - #[allow(dead_code)] /// Returns a set of project key pairs, representing all the unique combinations of /// `own_key` and `project_key` that are found in the store. + #[allow(dead_code)] fn project_key_pairs( &self, ) -> impl Future, Self::Error>>; diff --git a/relay-server/src/services/buffer/envelope_store/sqlite.rs b/relay-server/src/services/buffer/envelope_store/sqlite.rs index 87e3f8ec78..fe024459c6 100644 --- a/relay-server/src/services/buffer/envelope_store/sqlite.rs +++ b/relay-server/src/services/buffer/envelope_store/sqlite.rs @@ -562,8 +562,15 @@ mod tests { #[tokio::test] async fn test_estimate_disk_usage() { let db = setup_db(true).await; - let mut envelope_store = SqliteEnvelopeStore::new(db); + let mut store = SqliteEnvelopeStore::new(db.clone()); + + let envelopes = mock_envelopes(10); + store + .insert_many(envelopes.iter().map(|e| e.as_ref().try_into().unwrap())) + .await + .unwrap(); - println!("{:?}", envelope_store.usage()); + let usage = SqliteEnvelopeStore::estimate_usage(&db).await.unwrap(); + assert!(usage > 0); } }