|
Ran
|
Jobs
2
|
Files
267
|
Run time
1min
|
Badge
README BADGES
|
push
github
test(relay): signal invite mint await instead of yield polling (#991) (#1023) Contributed by @avantikonde, who wrote this fix and reported it on #991. The commit is cherry-picked with `-x` from theirs, so authorship is preserved rather than reassigned: - their commit: https://github.com/avantikonde/nostream/commit/a504b6942 - their branch: https://github.com/avantikonde/nostream/tree/test/close-during-mint-signal ## What it changes `a_close_during_the_invite_mint_leaves_the_event_but_not_the_read` waited for the invite mint with a 100-iteration `yield_now()` loop. On a loaded runner the loop can be exhausted before the mint task runs, and the test then fails with a message that accuses the mint. `InMemoryInviteCodeRepository` now carries a `tokio::sync::Notify` that fires when a `create` call starts, including one a gate is holding, and the test awaits it instead. `Notify` stores a permit when nothing is waiting, so a create that starts before the await still satisfies it. The two comment blocks explain why the test authenticates before subscribing (the mint sits behind the NIP-42 identity check) and why a wire test cannot assert this after #978, where `CLOSE` runs as a connection-loop prefix. Test-only: no production code path changes. ## Verification Built and run at the contributed commit on top of the current `rewrite/main` tip: ``` cargo test -p nostream-relay --test handlers a_close_during_the_invite_mint test a_close_during_the_invite_mint_leaves_the_event_but_not_the_read ... ok test result: ok. 1 passed; 0 failed; 51 filtered out ``` Closes #991.
3588 of 5362 branches covered (66.92%)
Branch coverage included in aggregate %.
7992 of 10291 relevant lines covered (77.66%)
867.92 hits per line
| ID | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|
| 1 | Integration - 41317034116.1 | 267 |
32.54
|
GitHub Action Run | |
| 2 | Unit - 41317034116.2 | 267 |
70.9
|
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|