mirror of
https://github.com/block/buzz.git
synced 2026-08-18 06:50:31 +02:00
fix(desktop): suppress await_holding_lock clippy lint on epoch tests
SCOPE_GENERATION_TEST_LOCK is a std::sync::Mutex held across await points in test_full_tail_stop_spawn_receipt_register_save and test_relay_mesh_preflight_precedes_stop to prevent concurrent tests from advancing the generation counter mid-test. The deadlock risk is acceptable in test-only code: the lock is never held across blocking operations, only across async coordination inside a single test. Suppress the lint explicitly with a comment explaining the rationale. Co-authored-by: Will Pfleger <pfleger.will@gmail.com> Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
This commit is contained in:
co-authored by
Will Pfleger
parent
7c455d9759
commit
27ea607243
@@ -23,6 +23,7 @@ use super::*;
|
||||
/// Non-empty personas, teams, and global are placed in both the context AND
|
||||
/// the captured definitions_dir so the spawn_fn can assert they arrive.
|
||||
#[tokio::test]
|
||||
#[allow(clippy::await_holding_lock)] // SCOPE_GENERATION_TEST_LOCK serialises parallel tests
|
||||
async fn test_full_tail_stop_spawn_receipt_register_save() {
|
||||
use crate::managed_agents::scope::SCOPE_GENERATION_TEST_LOCK;
|
||||
use crate::managed_agents::{
|
||||
@@ -434,6 +435,7 @@ async fn test_full_tail_stop_spawn_receipt_register_save() {
|
||||
/// Owner key must match the app's signing key — use the actual generated key
|
||||
/// from the mock app's AppState.
|
||||
#[tokio::test]
|
||||
#[allow(clippy::await_holding_lock)] // SCOPE_GENERATION_TEST_LOCK serialises parallel tests
|
||||
async fn test_relay_mesh_preflight_precedes_stop() {
|
||||
use super::super::restart_local_agent_on_config_change_for;
|
||||
use crate::commands::global_agent_config::RestartOutcome;
|
||||
|
||||
Reference in New Issue
Block a user