-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cbdbc0a
commit 559921d
Showing
8 changed files
with
78 additions
and
37 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
use crate::utils; | ||
use pgboss::Client; | ||
use uuid::Uuid; | ||
|
||
#[tokio::test] | ||
async fn delete_job_queue_does_not_exist() { | ||
let local = "delete_job_queue_does_not_exist"; | ||
utils::drop_schema(&local).await.unwrap(); | ||
|
||
let c = Client::builder().schema(local).connect().await.unwrap(); | ||
|
||
let job_id = Uuid::new_v4(); | ||
let queue_name = "jobtype"; | ||
|
||
let _ = c.delete_job(queue_name, job_id).await.unwrap(); | ||
} | ||
|
||
#[tokio::test] | ||
async fn delete_job() { | ||
let local = "fetch_job"; | ||
utils::drop_schema(&local).await.unwrap(); | ||
|
||
let c = Client::builder().schema(local).connect().await.unwrap(); | ||
c.create_standard_queue("jobtype").await.unwrap(); | ||
|
||
let job_id = Uuid::new_v4(); | ||
let queue_name = "jobtype"; | ||
|
||
// fetch one | ||
let _ = c.delete_job(queue_name, job_id).await.unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
mod job_delete; | ||
mod job_fetch; | ||
mod job_send; | ||
mod queue; | ||
|