mirror of
https://github.com/simplex-chat/simplexmq.git
synced 2026-11-22 17:48:24 +00:00
* tests: reproduce SUB and SEND race in one block
* smp server: move subscriber registration out of serverThread
* smp server: deliver messages sent while the recipient subscribes
* smp server: keep subscriber registration in smpServer, pass it to client
* tests: receive SUB and SEND responses in order
* smp server: register subscription of a new queue directly
* smp server: name server subscribers srvSubs in runClient
* tests: sign SUB with authTransmission, keep test helpers unchanged
* smp server: remove do and mask_ from subscribeNewQueue
* smp server: send the first message once when SEND delivers it during SUB
* smp server: plan with SUB and SEND sequences before and after the change
* smp server: one sequence diagram with added and removed steps in the plan
* smp server: process all subscription changes in the client thread, remove subQ and serverThread
* smp server: send the first message once after SUBS, keep service counts exact
* smp server: name the reader monad in the type of setService
* plans: correct the diagrams and decisions of subscription processing
* plans: diagrams of a duplicate SUB and of SUBS, corrected decisions
* plans: duplicate SUB with SEND, service counts before and after the change
* tests: switch subscription with SUB and SEND in one block
* docs: remove the outdated SMP server design diagram
* smp server: move processClientSub back to the place of serverThread, passed to client threads as a parameter
* smp server: pass the pair of subscription processors to client, applied to the client where called
* smp server: show subscribeQueue and sharedSubscribeQueue as comments at their master places, temporary [skip ci]
* smp server: remove the temporary comments, the tree equals 966701dd [skip ci]
* tests: cover the changed subscription paths with concurrent, blocked, service and notifier scenarios
* tests: cover SMP server subscription changes
* smp server: remove the subscription branch for a disconnected client
Running tests with coverage
- Uncomment coverage sections in cabal.project file.
- Add
-fhpcto ghc-options of simplexmq-test in simplexmq.cabal file. - Disable (
xit) test "should subscribe to multiple (200) subscriptions with batching", enable (commentskip) the next test instead. - Run
cabal test. - Open generated coverage report in the browser.