You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* WIP doodles on MembershipManager test cases
* .
* initial membership manager test setup.
* Updates from discussion
* revert renaming comments
* remove unused import
* fix leave delayed event resend test.
It was missing a flush.
* comment out and remove unused variables
* es lint
* use jsdom instead of node test environment
* remove unused variables
* remove unused export
* temp
* review
* fixup tests
* more review
* remove wait for expect dependency
* temp
* fix wrong mocked meberhsip template
* rename MembershipManager -> LegacyMembershipManager
And remove the IMembershipManager from it
* Add new memberhsip manager
* fix tests to be compatible with old and new membership manager
* Comment cleanup
* Allow join to throw
- Add tests for throwing cases
- Fixs based on tests
* introduce membershipExpiryTimeoutSlack
* more detailed comments and cleanup
* warn if slack is misconfigured and use default values instead
* fix action resets.
* flatten MembershipManager.spec.ts
* rename testEnvironment to memberManagerTestEnvironment
* allow configuring Legacy manager in the matrixRTC session
* deprecate LegacyMembershipManager
* remove usage of waitForExpect
* flatten tests and add comments
* clean up leave logic branch
* add more leave test cases
* use defer
* review ("Some minor tidying things for now.")
* add onError for join method and cleanup
* use pop instead of filter
* fixes
* simplify error handling and MembershipAction
Only use one membership action enum
* Add diagram
* fix new error api in rtc session
* fix up retry counter
* fix lints
* make unrecoverable errors more explicit
* fix tests
* Allow multiple retries on the rtc state event http requests.
* use then catch for startup
* no try catch 1
* update expire headroom logic
transition from try catch to .then .catch
* replace flushPromise with advanceTimersByTimeAsync
* fix leaving special cases
* more unrecoverable errors special cases
* move to MatrixRTCSessionManager logger
* add state reset and add another unhandleable error
The error occurs if we want to cancel the delayed event we still have an id for but get a non expected error.
* missed review fixes
* remove @jest/environment dependency
* Cleanup awaits and Make mock types more correct.
Make every mock return a Promise if the real implementation does return a pormise.
* remove flush promise dependency
* fix not recreating default state on reset
This broke all tests since we only created the state once and than passed by ref
* Use per action rate limit and retry counter
There can be multiple retries at once so we need to store counters per action
e.g. the send update membership and the restart delayed could be rate limited at the same time.
* add linting to matrixrtc tests
* Add fix async lints and use matrix rtc logger for test environment.
* prettier
* review step 1
* change to MatrixRTCSession logger
* review step 2
* make LoopHandler Private
* update config to use NewManager wording
* emit error on rtc session if the membership manager encounters one
* network error and throw refactor
* make accessing the full room deprecated
* remove deprecated usage of full room
* Clean up the deprecation
* add network error handler and cleanup
* better logging, another test, make maximumNetworkErrorRetryCount configurable
* more logging & refactor leave promise
* add ConnectionError as possible retry cause
* Make it work in embedded mode with a server that does not support delayed events
* review iteration 1
* review iteration 2
* first step in improving widget error handling
* make the embedded client throw ConnectionErrors where desired.
* fix tests
* delayed event sending widget mode stop gap fix.
* improve comment
* fix unrecoverable error joinState (and add JoinStateChanged) emission.
* check that we do not add multipe sendFirstDelayed Events
* also check insertions queue
* always log "Missing own membership: force re-join"
* Do not update the membership if we are in any (a later) state of sending our own state.
The scheduled states MembershipActionType.SendFirstDelayedEvent and MembershipActionType.SendJoinEvent both imply that we are already trying to send our own membership state event.
* make leave reset actually stop the manager.
The reset case was not covered properly. There are cases where it is not allowed to add additional events after a reset and cases where we want to add more events after the reset. We need to allow this as a reset property.
* fix tests (and implementation)
* Allow MembershipManger to be set at runtime via JoinConfig.membershipManagerFactory
* Map actions into status as a sanity check
* Log status change after applying actions
* Add todo
* Cleanup
* Log transition from earlier status
* remove redundant status implementation
also add TODO comment to not forget about this.
* More cleanup
* Consider insertions in status()
* Log duration for emitting MatrixRTCSessionEvent.MembershipsChanged
* add another valid condition for connected
* some TODO cleanup
* review add warning when using addAction while the scheduler is not running.
* es lint
* refactor to return based handler approach (remove insertions array)
* refactor: Move action scheduler
* refactor: move different handler cases into separate functions
* linter
* review: delayed events endpoint error
* review
* Suggestions from pair review
* resetState is actually only used internally
* Revert "resetState is actually only used internally"
This reverts commit 6af4730.
* refactor: running is part of the scheduler (not state)
* refactor: move everything state related from schduler to manager.
* review
* Update src/matrixrtc/NewMembershipManager.ts
Co-authored-by: Hugh Nimmo-Smith <[email protected]>
* review
* public -> private + missed review fiexes (comment typos)
---------
Co-authored-by: Hugh Nimmo-Smith <[email protected]>
Co-authored-by: Hugh Nimmo-Smith <[email protected]>
0 commit comments