Comments (2)
It looks like rspec has a memory leak when doing multiple runs within the same process. If Iām not mistaken, I think is how knapsack pro operates.
Yes, we call ::RSpec::Core::Runner
for each batch of tests fetched from Queue API.
In past, we noticed that if you were to use KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES=true
and run too many RSpec test cases in queue mode it could lead to more memory consumption so that's why we try to run a minimal number of test cases when you use the RSpec split by test examples feature.
Along the same lines, it would be better if knapsack pro could write custom runner that queries and adds tests on the fly to a single test run. This would make the output more seamless and address the memory issue, if it were the case.
Do you have an idea how this could be done other than calling ::RSpec::Core::Runner
?
Here is how it's done for Queue Mode now.
After each batch of tests fetched from Queue API we executed the tests with ::RSpec::Core::Runner
. After that we clean up some stuff with the rspec_clear_examples method.
It cleans up a few things:
You could use after_subset_queue
to run a custom code that could do more cleanup as a next step. Maybe we could put there some code from the PR.
KnapsackPro::Hooks::Queue.after_subset_queue do |queue_id, subset_queue_id|
puts 'after_subset_queue - run after the previous subset of tests'
end
The after_subset_queue
hook is called after the rspec_clear_examples
.
from knapsack_pro-ruby.
Related Issues (20)
- Queue mode causes rspec_junit_formatter to produce invalid XML when a node runs a spec with all examples commented out. HOT 8
- Thread.join causes knapsack to hang on circleCI HOT 13
- Enabled KNAPSACK_PRO_RSPEC_SPLIT_BY_TEST_EXAMPLES and now get uninitialized constant at end of run HOT 10
- Regular mode (non-queue) rspec outputs all spec file names on startup HOT 4
- All examples skipped after exception in before: suite hook in queue mode HOT 2
- Lots of failures with rolify gem after 4.1 -> 5.0 bump HOT 12
- Docs need to specify ENV var to detect CI provider HOT 1
- Fail gracefully when there's no git HOT 8
- Running `git fetch --shallow-since` to fetch commit author log causes hang on Buildkite runners HOT 12
- rspec-core conflict HOT 4
- Running queue mode locally for troubleshooting with a small subset of tests, but with multiple batches HOT 6
- Does `rake knapsack_pro:rspec_test_example_detector` need to run if there aren't any slow specs? HOT 2
- Slow test analysis runs even when there's no slow tests HOT 2
- Disable example_status_persistence_file_path HOT 3
- Create a replication command on failed node HOT 2
- Incompatibility with rspec --options on 6.0+ HOT 11
- NoMethodError: undefined method `rspec_is_quitting' HOT 2
- NoMethodError: undefined method `rspec_is_quitting' for RSpec::Core::World HOT 1
- After upgrading to minitest 5.22.0 I get error status even if all test pass HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ššš
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ā¤ļø Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from knapsack_pro-ruby.