Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions crates/comenqd/src/daemon.rs
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,8 @@ mod tests {
async fn setup_run_worker(status: u16) -> (MockServer, Arc<Config>, Receiver, Arc<Octocrab>) {
let dir = tempdir().expect("tempdir");
let cfg = Arc::new(Config {
cooldown_period_seconds: 0,
// Use a positive cooldown to ensure retries are throttled.
cooldown_period_seconds: 1,
..temp_config(&dir)
});
let (mut sender, rx) = channel(&cfg.queue_path).expect("channel");
Expand All @@ -352,7 +353,12 @@ mod tests {
let server = MockServer::start().await;
Mock::given(method("POST"))
.and(path("/repos/o/r/issues/1/comments"))
.respond_with(ResponseTemplate::new(status).set_body_raw("{}", "application/json"))
.respond_with(
ResponseTemplate::new(status).set_body_json(&serde_json::json!({
"id": 1,
"body": "b",
})),
)
.mount(&server)
.await;

Expand Down
Loading