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

Move events infrastructure to the core #106

Merged
merged 30 commits into from
Jun 6, 2016
Merged

Move events infrastructure to the core #106

merged 30 commits into from
Jun 6, 2016

Conversation

mattwynne
Copy link
Member

@mattwynne mattwynne commented Apr 15, 2016

Rationale

We're using events heavily in the front-end now, and it makes more sense to have both the Events::Bus plumbing and the firing of events come straight out of the core. As a bonus, we remove the conceptual overhead of a "report".

TODO:

  • Add complete tests for the report API in spec/core_spec.rb
  • Port over the tests for the event bus from cucumber/cucumber-ruby
  • Get @tooky and @brasmusson's feedback on the new API - WDYT?
  • Update cucumber to use the new API (see Integrate new core events cucumber-ruby#973)
  • improve the YARD docs for events
  • fix the readme prose to talk about events not report
  • Ship it!

@mattwynne
Copy link
Member Author

We should also add a GherkinParsed event or similar

@mattwynne mattwynne force-pushed the events branch 4 times, most recently from 8034e82 to 3df4549 Compare April 24, 2016 21:49
@mattwynne mattwynne changed the title Events Move events infrastructure to the core May 17, 2016
@mattwynne
Copy link
Member Author

@danascheider @brasmusson @tooky this PR craves your attention!

Seriously, it would be good to get this merged (and cucumber/cucumber-ruby#973 which leans on it) as it's a fairly big lump and the longer we leave it the harder it will be to do.

Would it make it easier to read if I tidy up the commits?

@mattwynne
Copy link
Member Author

Since it's happened multiple times, it's probably something we should look at though

I agree. I haven't witnessed these failures myself I don't think. Can you raise an issue with the travis output in them @danascheider? I can't see how to dig out the original failure for a build that's been rebuilt.

@danascheider
Copy link
Contributor

Sure, at first I thought it was just a random hiccup in Travis and not a problem with Cucumber and JRuby, so I didn't see it as necessary. I'll create an issue and then next time the failure comes up, I'll paste the error message into the issue. And if it doesn't come up, so much the better.

@mattwynne
Copy link
Member Author

You can't remember which test it was that failed, can you?

@danascheider
Copy link
Contributor

Yes, it was the very last one in both cases.

@brasmusson
Copy link
Contributor

You mean the :slow test? Yes, normally it runs in ~7s on JRuby on Travis, but sometimes it takes slightly more than 10s - which makes it fail. Haven't we somewhere extended timeouts in test for JRuby? In Cucumber-Ruby? Maybe we should do the same here.

@danascheider
Copy link
Contributor

Yes, @brasmusson - it's the slow one

@@ -6,5 +6,5 @@
formatters << Coveralls::SimpleCov::Formatter
end

SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[*formatters]
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new(formatters)
Copy link
Contributor

@brasmusson brasmusson May 22, 2016

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change does not work with coveralls v0.8.2, the result is a "initialize': wrong number of arguments (1 for 0) (ArgumentError)". I happen to have coveralls v0.8.2 installed as it both fulfils the cucmber-ruby(-core) requirement of '~>0.7' and the gherkin requirement of '~> 0.8', '< 0.8.8'.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're right - this change doesn't belong in here. We should sort this out in the master branch.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reverted in cf7e975.

@test_cases = Test::Result::Summary.new
@test_steps = Test::Result::Summary.new
subscribe_to(event_bus)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this class is connected directly to the event_bus then it need to filter out the notification from the executed hooks, since they are not included in the step counts.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 7bbae8b

@brasmusson brasmusson merged commit f76cf6b into master Jun 6, 2016
brasmusson added a commit that referenced this pull request Jun 6, 2016
@brasmusson
Copy link
Contributor

I took the step to merge this (both to make progress on this and to be able to rebase cucumber/cucumber-ruby#977 with the event bus in the core). Two review comment are not fixed (#106 (comment) and #106 (comment)), not because I reject them, but more with the comment "yes, there are duplication here, but I do not see the simple refactoring to fix that, so I choose not to spend time on working on them, they can be improved on the master branch".

@brasmusson brasmusson deleted the events branch June 6, 2016 18:13
@mattwynne
Copy link
Member Author

Thanks for all the scrutiny and tidy-up work @danascheider and @brasmusson 👏

@lock
Copy link

lock bot commented Oct 24, 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 24, 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.

3 participants