Skip to content
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

Start the event bus after all listeners are registered #1059

Closed
wants to merge 1 commit into from

Conversation

brasmusson
Copy link
Contributor

Summary

To make sure that all listeners will receive all events broadcasted through the event bus, start the event bus only after all listeners have had a change so register themselves with the event bus.

One case where this is important is so that the usage formatter get to know all step definitions that are registered, even though the step definitions are registered before the formatters have been created.

Details

Revert changes in file loading from #977, so that the support and step definition files again are loaded at the same time (before the formatters has been created).

Call EventBus#start after all formatters and other event bus listeners have been created and had a change to register themselves with the event bus.

Requires cucumber/cucumber-ruby-core#117.

Motivation and Context

Fixes #1041.

How Has This Been Tested?

The current usage_formatter.feature verifies that the step definitions loaded before the usage/stepdefs formatter has registered itself with the event bus are reported by the usage/stepdefs formatter.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)

Checklist:

  • I've added tests for my code (the current features verify the correctness of the change).

To make sure that all listeners will receive all events broadcasted
through the event bus, start the event bus only after all listeners
have had a change so register themselves with the event bus.

One case where this is important is so that the usage formatter get to
know all step definitions that are registered, even though the step
definitions are registered before the formatters have been created.
@brasmusson
Copy link
Contributor Author

Superseded by cucumber/cucumber-ruby-core#136.

@brasmusson brasmusson closed this Jun 24, 2017
@brasmusson brasmusson deleted the event-bus-start branch June 24, 2017 19:16
@lock
Copy link

lock bot commented Oct 25, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Oct 25, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Step defs formatter should report all available step defs even if they haven't been matched
2 participants