Creates a temporary key store directory with test keys
()
| 162 | } |
| 163 | } |
| 164 | }); |
| 165 | |
| 166 | (query, handle) |
| 167 | } |
| 168 | |
| 169 | /// A mock state-query mailbox whose `GenerateStateProof` responses are gated: |
| 170 | /// every received proof request increments `received` and then blocks until the |
| 171 | /// returned one-shot release trigger fires, letting a test hold many proof |
| 172 | /// generations in flight at once. Each request is handled in its own spawned |
| 173 | /// task (mirroring the finalizer's off-loop proof spawn) so the mock keeps |
| 174 | /// accepting requests while earlier ones are held open. |
| 175 | /// |
| 176 | /// Returns the query handle, an in-flight-received counter, and the release |
| 177 | /// trigger (drop or send `()` to let all held requests complete). |
| 178 | pub fn create_gated_proof_mailbox() -> ( |
| 179 | ConsensusStateQuery<TestScheme>, |
| 180 | Arc<AtomicUsize>, |
| 181 | oneshot::Sender<()>, |
| 182 | JoinHandle<()>, |
| 183 | ) { |
| 184 | let (query, mut rx) = ConsensusStateQuery::new(1024); |
no test coverage detected