Skip to content

Handle exception when running rspec (Queue mode) #214

Merged
ArturT merged 6 commits intoKnapsackPro:masterfrom
thukim:chore/rspec_exception
Aug 1, 2023
Merged

Handle exception when running rspec (Queue mode) #214
ArturT merged 6 commits intoKnapsackPro:masterfrom
thukim:chore/rspec_exception

Conversation

@thukim
Copy link
Copy Markdown
Contributor

@thukim thukim commented Jul 23, 2023

Issue: When running rspec with the queue mode and having exception, the existing code doesn't trigger the after_subset_queue and after_queue hooks

This PR handles exception in the above scenario that:

  • It logs the exception which causes Knapsack Pro to exit/abort (debug mode)
  • Triggers the after_subset_queue and after_queue
  • Prints the summary before exiting: Unexecuted tests, pending tests and failed tests
    After that, it will re-raise the exception.

Please let me know if there is anything I need to update/address in this PR. Thank you!

@ArturT ArturT added the bug label Jul 24, 2023
@ArturT
Copy link
Copy Markdown
Member

ArturT commented Jul 26, 2023

Thanks for the PR, @thukim

Could you resolve the conflicts with the master branch?

My PR introduced small changes to the files:

  • lib/knapsack_pro/runners/queue/rspec_runner.rb
  • spec/knapsack_pro/runners/queue/rspec_runner_spec.rb

or you can give us access to the PR and we can do it on our own when we will start review for this PR. Thanks.

To do it, edit PR and select Allow edits from maintainers. More info. Thank you.

@thukim
Copy link
Copy Markdown
Contributor Author

thukim commented Jul 28, 2023

Hi @ArturT ,

I have resolved conflict and also selected Allow edits by maintainers to give you access to the PR.

Thanks!

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Jul 28, 2023

Thanks @thukim

@ArturT
Copy link
Copy Markdown
Member

ArturT commented Aug 1, 2023

I added some small improvements on top of this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants