diff --git a/backend/tests/asset_trigger_dispatch.rs b/backend/tests/asset_trigger_dispatch.rs index 316069df08..894a98e353 100644 --- a/backend/tests/asset_trigger_dispatch.rs +++ b/backend/tests/asset_trigger_dispatch.rs @@ -75,6 +75,12 @@ async fn seed_asset_write( .bind(producer_path) .execute(db) .await?; + // The dispatcher caches the per-workspace producer set, normally + // invalidated at deploy via the notify_event poller. These tests seed + // `asset` rows directly and run no poller, so invalidate here to mirror + // what a deploy would do — otherwise a stale cache hides freshly-seeded + // producers and nothing dispatches. + windmill_queue::asset_dispatch::ASSET_PRODUCER_WRITES_CACHE.remove(WS); Ok(()) }