Skip to content

Implement minitest-queue bisect #43

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

Merged
merged 1 commit into from
Nov 28, 2017
Merged

Implement minitest-queue bisect #43

merged 1 commit into from
Nov 28, 2017

Conversation

casperisfine
Copy link
Contributor

@casperisfine casperisfine commented Nov 23, 2017

This PR extract and properly package the bisect-leak script we've been using at Shopify.

Usage: minitest-queue --queue path/to/test_order.log --failing-test 'Test#identifier' bisect -Itest path/to/*_test.rb.

See minitest_bisect_test.rb for more detailed usage, and output.

@@ -58,7 +58,8 @@ def queue=(queue)

def queue_reporters=(reporters)
@queue_reporters ||= []
Reporters.reporters = ((Reporters.reporters || []) - @queue_reporters) + reporters
Reporters.use!(((Reporters.reporters || []) - @queue_reporters) + reporters)
Minitest.backtrace_filter.add_filter(%r{exe/minitest-queue|lib/ci/queue/})
Copy link
Contributor

Choose a reason for hiding this comment

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

This may only work in Rails environments. The minitest backtrace_filter object is not as advanced as the Rails one. Not sure if that's a problem.

Copy link
Contributor Author

@casperisfine casperisfine Nov 27, 2017

Choose a reason for hiding this comment

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

No it just need minitest-reporters (which is a ci-queue dependency). The integration test (not Rails) goes through this and it works just fine.

Copy link
Member

@DazWorrall DazWorrall left a comment

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants