Page MenuHomePhabricator

Tests depending on EventBus fail when EventStreamConfig is not loaded
Open, Needs TriagePublic

Description

EventBus tests fail when EventStreamConfig is not loaded:

There were 4 errors:

1) EventBusFactoryTest::testGetEventServiceName with data set "disabled service" ('disabled_stream', '_disabled_eventbus_')
Error: Class "MediaWiki\Extension\EventStreamConfig\StreamConfigs" not found

extensions/EventBus/tests/phpunit/unit/EventBusFactoryTest.php:149

2) EventBusFactoryTest::testGetEventServiceName with data set "stream without destination event service" ('stream_without_destination_ev...ervice', 'intake-main')
Error: Class "MediaWiki\Extension\EventStreamConfig\StreamConfigs" not found

extensions/EventBus/tests/phpunit/unit/EventBusFactoryTest.php:149

3) EventBusFactoryTest::testGetEventServiceName with data set "stream with explicit event service" ('other_stream', 'intake-other')
Error: Class "MediaWiki\Extension\EventStreamConfig\StreamConfigs" not found

extensions/EventBus/tests/phpunit/unit/EventBusFactoryTest.php:149

4) EventBusFactoryTest::testGetEventServiceName with data set "stream with T321557 BC setting" ('stream_with_destination_event...etting', 'intake-main')
Error: Class "MediaWiki\Extension\EventStreamConfig\StreamConfigs" not found

extensions/EventBus/tests/phpunit/unit/EventBusFactoryTest.php:149

This will also cause extension that solely depends on EventBus to fail, for example WikimediaEvents.

In production we always load EventBus, but EventStreamConfig is only loaded when wmgUseEventLogging is set. Thus I don't think it should be marked a hard requirement (added to requires in extension.json).

Some EventBus test is marked to be skipped when EventStreamConfig is not loaded. The above tests should be skipped as well (and that will be enforced by CI via T407797).

Event Timeline

Change #1205103 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions/EventBus@master] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1205103

Change #1205104 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions/EventBus@master] tests: skip tests when EventStreamConfig is not loaded

https://gerrit.wikimedia.org/r/1205104

Change #1205103 merged by jenkins-bot:

[mediawiki/extensions/EventBus@master] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1205103

Change #1205104 merged by jenkins-bot:

[mediawiki/extensions/EventBus@master] tests: skip tests when EventStreamConfig is not loaded

https://gerrit.wikimedia.org/r/1205104

Change #1213955 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions/EventBus@REL1_43] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1213955

Change #1213956 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions/EventBus@REL1_44] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1213956

Change #1213957 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions/EventBus@REL1_45] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1213957

Change #1213959 had a related patch set uploaded (by Hashar; author: Hashar):

[mediawiki/extensions/EventBus@REL1_45] tests: skip tests when EventStreamConfig is not loaded

https://gerrit.wikimedia.org/r/1213959

Change #1213956 merged by jenkins-bot:

[mediawiki/extensions/EventBus@REL1_44] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1213956

Change #1213955 merged by jenkins-bot:

[mediawiki/extensions/EventBus@REL1_43] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1213955

Change #1213957 merged by jenkins-bot:

[mediawiki/extensions/EventBus@REL1_45] tests: use markTestSkippedIfExtensionNotLoaded() helper

https://gerrit.wikimedia.org/r/1213957

Change #1213959 merged by jenkins-bot:

[mediawiki/extensions/EventBus@REL1_45] tests: skip tests when EventStreamConfig is not loaded

https://gerrit.wikimedia.org/r/1213959