mediawiki-extensions-Popups/tests/node-qunit/changeListeners
Sam Smith 79f3b318d0 Track and discard duplicate enqueued events
The eventLogging change listener is responsible for ensuring that the
internal state of Page Previews matches its external state (that
perceived by the user and UA). It does this by logging events with
ext.eventLog.Schema#log. This makes it the perfect place to track and
discard duplicate events enqueued by the Page Previews codebase observed
in T161769.

Make the change listener track events that it's logged by storing hashes
of the dynamic parts of them in memory. If the eventLogging change
listener sees the same event more than once, then it discards it and
increments a counter in StatsD.

This behaviour should be enabled for a matter of days as we should see
whether the duplicate events are being enqueued by the Page Previews
codebase immediately.

Bug: T163198
Change-Id: I6a38a2619d777a76dd45eb7300079e1f07b07b12
2017-04-28 15:12:40 +01:00
..
eventLogging.test.js Track and discard duplicate enqueued events 2017-04-28 15:12:40 +01:00
footerLink.test.js Hygiene: QUnit setup -> beforeEach & teardown -> afterEach 2017-04-26 12:34:12 +02:00
linkTitle.test.js Hygiene: QUnit setup -> beforeEach & teardown -> afterEach 2017-04-26 12:34:12 +02:00
render.test.js Hygiene: QUnit setup -> beforeEach & teardown -> afterEach 2017-04-26 12:34:12 +02:00
settings.test.js Hygiene: QUnit setup -> beforeEach & teardown -> afterEach 2017-04-26 12:34:12 +02:00
statsv.test.js Remove isLoggingEnabled with Null Object pattern 2017-04-27 14:29:04 +01:00
syncUserSettings.test.js Hygiene: QUnit setup -> beforeEach & teardown -> afterEach 2017-04-26 12:34:12 +02:00