Skip to content

Commit

Permalink
Specify single thread tokio tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AntoniosBarotsis committed Dec 10, 2024
1 parent 7fc4ddb commit c92992d
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/api_keys.rs
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ mod test {
use crate::types::CreateApiKeyOptions;
use crate::Result;

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn all() -> Result<()> {
let resend = &*CLIENT;
Expand Down
2 changes: 1 addition & 1 deletion src/audiences.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ mod test {
use crate::tests::CLIENT;
use crate::Result;

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn all() -> Result<()> {
let resend = &*CLIENT;
Expand Down
4 changes: 2 additions & 2 deletions src/broadcasts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ mod test {
Result,
};

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn create_send_broadcast() -> Result<()> {
let resend = &*CLIENT;
Expand Down Expand Up @@ -298,7 +298,7 @@ mod test {
Ok(())
}

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn list_get_broadcast() -> Result<()> {
let resend = &*CLIENT;
Expand Down
2 changes: 1 addition & 1 deletion src/contacts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ mod test {
use crate::types::{ContactChanges, ContactData};
use crate::Result;

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn all() -> Result<()> {
let resend = &*CLIENT;
Expand Down
2 changes: 1 addition & 1 deletion src/domains.rs
Original file line number Diff line number Diff line change
Expand Up @@ -395,7 +395,7 @@ mod test {
Result,
};

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn all() -> Result<()> {
let resend = &*CLIENT;
Expand Down
4 changes: 2 additions & 2 deletions src/emails.rs
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ mod test {
use crate::{tests::CLIENT, Result};
use jiff::{Span, Timestamp, ToSpan, Zoned};

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn all() -> Result<()> {
let from = "Acme <[email protected]>";
Expand Down Expand Up @@ -582,7 +582,7 @@ mod test {
Ok(())
}

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn schedule_email() -> Result<()> {
let now_plus_1h = Zoned::now()
Expand Down
4 changes: 2 additions & 2 deletions src/rate_limit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ mod tests {
use super::{send_with_retry_opts, RetryOptions};
use crate::Error;

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn test_retry_count_err() {
let mut run_count = 0u32;
Expand Down Expand Up @@ -242,7 +242,7 @@ mod tests {
assert!(run_count == 0);
}

#[tokio::test]
#[tokio::test(flavor = "current_thread")]
#[cfg(not(feature = "blocking"))]
async fn test_retry_count_ok() {
let mut retry_count = 0u32;
Expand Down

0 comments on commit c92992d

Please sign in to comment.