Comments (3)
Hi @vipulnsward
Can you ensure you have in Gemfile
group :test do
gem 'vcr'
gem 'webmock', require: false # this must be set to false
end
in spec helper or rails helper you must ensure requests to Knapsack Pro API are allowed.
require 'vcr'
VCR.configure do |config|
config.hook_into :webmock
config.ignore_hosts('localhost', '127.0.0.1', '0.0.0.0', 'api.knapsackpro.com')
end
# add below when you hook into webmock
require 'webmock/rspec'
WebMock.disable_net_connect!(allow_localhost: true, allow: ['api.knapsackpro.com'])
This is based on tips in https://docs.knapsackpro.com/knapsack_pro-ruby/guide/
Do you run tests on CI? Are they failing on CI or do you test this locally?
Can you paste the exact error with backtrace returned by RSpec when running knapsack_pro command?
Can you paste your test code, how do you use VCR. How the path to the cassette looks like.
Do you use parallel_tests gem at the same time?
Do you reconfigure VCR somehow during runtime of the tests?
I don't recall any similar issue to yours so I'm wondering if this is something specific to your project and how you setup VCR.
from knapsack_pro-ruby.
Update:
We had 2 uses of VCR.configuration.ignore_request { true }
for some variable request specs.
Commenting them out seems to make the CI be stable again.
Will need to figure out why this is though, since we do need them for some valid spec scenarios and it seems to work fine if run without knapsack/threaded mode.
Can close this issue, if you'd like meanwhile.
from knapsack_pro-ruby.
It looks like you have to adjust your block VCR.configuration.ignore_request { true }
to return false
when the request is going to Knapsack Pro API (You should allow a request for api.knapsackpro.com
) and otherwise, return true
to keep your current behavior.
https://relishapp.com/vcr/vcr/v/2-2-5/docs/configuration/ignore-request
If you see any exception or backtrace error please share. You can also send a message to support email https://knapsackpro.com/contact if this contains private data.
For now, I would say it's rather not related to "mutex/thread context issue" because you run knapsack_pro command per CI node in the isolated machine (i.e. docker container in Buildkite I guess). So just 1 test is executed at a time inside of knapsack_pro process using RSpec.
from knapsack_pro-ruby.
Related Issues (20)
- 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
- NoMethodError: undefined method `keys' for nil HOT 20
- Failing RSpec tests on ~>7.0.0 HOT 9
- DataDog dropping RSpec tests with the knapsack_pro 7.x gem in Queue Mode HOT 1
- Knapsack v7 ignores run options defined in spec_helpers. HOT 3
- Ruby 3.3 support? HOT 4
- Simplecov doesnt work with Knapsack Pro 7.4 and minitest HOT 16
- Improve handling of skipped tests and dynamic parallelism HOT 1
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.