-
Notifications
You must be signed in to change notification settings - Fork 401
test: subscription/presence behavior with shared-worker #463
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
test: subscription/presence behavior with shared-worker #463
Conversation
added tests with edge cases for subscribe/unsubscribe with sharedworker
…ling compatible behaviour
🎉 Snyk checks have passed. No issues have been found so far.✅ security/snyk check is complete. No issues have been found. (View Details) ✅ license/snyk check is complete. No issues have been found. (View Details) |
… distribution in scenario where messages arrive in one of the aggregated channel entities
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly looks good. Just a few comments which maybe will give some ideas for improvement in other test cases in this suite.
…hange behaviour in share worker active subscription
…on change, added new test to verify resubscribing to same channel with message reecive check
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
09a5d19
into
fix/subscribe-aggregate-heartbeats-feedback
* fix(shared-worker): fix rapid subscribe aggregate Fix the issue because of which rapid subscription (from other PubNub clients in response to received subscribe response) throttling causes delayed channel list change. refactor(shared-worker): add output of requests processed by the `SharedWorker` Modify the `log` payload for `SharedWorker` to make it possible to log sent / received requests information to the main browser window (not to the SharedWorker console). * feat(shared-worker): emit heartbeat processing status Depending on client configuration, it will emit `status` for heartbeat, which has been started by the `SharedWorker` backup heartbeat timer mechanism. feat(shared-worker): stop `backup` heartbeats on 403 Stop heartbeats until the auth key / access token is changed. On change, `SharedWorker` will send an immediate heartbeat request. refactor(shared-worker): restart `backup` heartbeat on explicit heartbeat Restart the timer of the backup heartbeat if an explicit heartbeat request has been received from the main PubNub client. * fix(subscription-set): fix issue with global subscription set Fix the issue with the global subscription set (used for legacy interface support) because of which `unsubscribe` with the legacy interface wasn't able to complete the unsubscribe process. * refactor(shared-worker): move some logs before request sending To avoid confusion in the logs reading where the message about sending the request appears earlier than it should, move the log output before sending the request. * refactor(shared-worker): announce request sending logs to interested clients Make sure that more clients will receive log messages about request sending (we're limited to a single client for heartbeat requests). refactor(shared-worker): change log message when heartbeat impossible for presence-only channels Change the misleading console message for heartbeat requests, which are scheduled for presence-only (`-pnpres`). * test: subscription/presence behavior with shared-worker (#463) * added karma configuration for sharedworker tests with headless browser, added tests with edge cases for subscribe/unsubscribe with sharedworker * fix: shared worker tests to adapt quick subscription aggregation handling compatible behaviour * test: shared worker subscription aggregation and isolation in message distribution in scenario where messages arrive in one of the aggregated channel entities * test(shared-worker): added test for token management, to test token change behaviour in share worker active subscription * test(shared-worker): added message verification to confirm subscription change, added new test to verify resubscribing to same channel with message reecive check * test(shared-worker): test cleanup, removed debug logs * test(shared-worker) confirm auth token changes through middleware generated request url * test: added test to inspect presence behaviour mimicking tab close activities --------- Co-authored-by: Mohit Tejani <mohit.tejani@Mohits-MacBook-Pro.local> * refactor(shared-worker): incorporate server threshold into heartbeat filter Incorporate a 3-second threshold from the server to the logic that is used to skip heartbeat requests if it has been sent too soon (because the previous one was not so long ago). * fix(shared-worker): fix issue which prevented catchup Fix the condition that, in some cases (burst subscribe from registered clients) incorrectly identified when the initial subscribe REST API response should be patched with catch timetoken. * refactor(shared-worker): re-adjust "backup" timer on early heartbeat Re-adjust "backup" heartbeat timer when one of the clients request sent too early after previous request. * PubNub SDK v9.8.0 release. --------- Co-authored-by: Mohit Tejani <60129002+mohitpubnub@users.noreply.github.com> Co-authored-by: Mohit Tejani <mohit.tejani@Mohits-MacBook-Pro.local> Co-authored-by: PubNub Release Bot <120067856+pubnub-release-bot@users.noreply.github.com>
Configuration to execute shared-worker tests in headless browser environment.
Tests to confirm subscription behavior in pubnub with shared worker.