Skip to content

Commit

Permalink
Add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
iambriccardo committed Jul 24, 2024
1 parent 6df30e2 commit e43f61e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions relay-server/src/services/spooler/envelope_stack/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ mod sqlite;
pub trait EnvelopeStack {
type Error;

#[allow(dead_code)]
async fn push(&mut self, envelope: Box<Envelope>) -> Result<(), Self::Error>;

#[allow(dead_code)]
async fn peek(&mut self) -> Result<&Box<Envelope>, Self::Error>;

#[allow(dead_code)]
async fn pop(&mut self) -> Result<Box<Envelope>, Self::Error>;
}
2 changes: 2 additions & 0 deletions relay-server/src/services/spooler/envelope_stack/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ pub struct SQLiteEnvelopeStack {
}

impl SQLiteEnvelopeStack {
#[allow(dead_code)]
pub fn new(
db: Pool<Sqlite>,
spool_threshold: usize,
Expand Down Expand Up @@ -269,6 +270,7 @@ mod tests {
RequestMeta::new(dsn)
}

#[allow(clippy::vec_box)]
fn mock_envelopes(count: usize) -> Vec<Box<Envelope>> {
let instant = Instant::now();
(0..count)
Expand Down

0 comments on commit e43f61e

Please sign in to comment.