-
Notifications
You must be signed in to change notification settings - Fork 28
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
Running queue mode locally for troubleshooting with a small subset of tests, but with multiple batches #219
Comments
Another reason we'd like this is for when we need to work on our CI rspec formatters, and their interactions with the ones Knapsack Pro adds. In the sort term, I've been able to kinda fake this by adding an arbitrary loop around knapsack_pro-ruby/lib/knapsack_pro/runners/queue/rspec_runner.rb Lines 80 to 122 in ddc8f71
|
Maybe this will be helpful. Here is an example of how I explicitly defined custom tests batches when I wanted to debug something. |
You can keep using the current API token and just use the separate branch name for testing purposes. The only tiny downside could be that you would affect the mean execution time of tests, but taking into account how often you are running CI builds it would be a negligible impact. |
Would it be possible to use a different suite (and thus token) for it? That could help isolate the changes. I was able to apply the idea from https://github.com/KnapsackPro/knapsack_pro-ruby/pull/161/files . I generalized it a little so I could included it in a file w/o having to modify my gems: module KnapsackPatch
@@i = 0
def test_file_paths(args)
@@i += 1
case @@i
when 1
[
"spec/a_spec.rb",
"spec/b_spec.rb",
]
when 2
[
"spec/c_spec.rb",
"spec/d_spec.rb",
]
else
[]
end
end
end
KnapsackPro::Runners::Queue::RSpecRunner.prepend(KnapsackPatch) |
Yes. You can run at least one CI build for all test files for a new API token to have execution time recorded. |
#200 is closed, so I think we can close this question/issue for now. Feel free to re-open if you need more help. |
We are thinking about #200 again, and trying to find ways to reproduce the queue runner locally so we can use memory_profiler on it.
https://docs.knapsackpro.com/ruby/troubleshooting/ outlines the broad steps, but the problems I'm running into with reproducing:
KNAPSACK_PRO_TEST_FILE_LIST_SOURCE_FILE
with the files to use, but I'm finding it hard to balance getting a small enough batch that it doesn't take too long, but not too big that it takes too longI think ideally, I'd be able to specify a few batches of specs and run those, rather than fetching the API.
The text was updated successfully, but these errors were encountered: