diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8e95a34..967f255 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,6 +22,8 @@ jobs: run: make check-fmt - name: Lint run: make lint + - name: Test Only + run: make test - name: Test and Measure Coverage uses: leynos/shared-actions/.github/actions/generate-coverage@c6559452842af6a83b83429129dccaf910e34562 with: diff --git a/crates/comenqd/src/daemon.rs b/crates/comenqd/src/daemon.rs index 4df9ac4..a3e28d7 100644 --- a/crates/comenqd/src/daemon.rs +++ b/crates/comenqd/src/daemon.rs @@ -334,7 +334,8 @@ mod tests { async fn setup_run_worker(status: u16) -> (MockServer, Arc, Receiver, Arc) { 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"); @@ -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;