For the past some days, when I try to run tests locally, I am getting this error:
$ bundle exec rake autospec
...
An error occurred while loading ./spec/components/discourse_redis_spec.rb.
Failure/Error:
describe DiscourseRedis::Connector do
let(:connector) { DiscourseRedis::Connector.new(config) }
after do
fallback_handler.master = true
end
it 'should return the master config when master is up' do
expect(connector.resolve).to eq(config)
end
NameError:
uninitialized constant DiscourseRedis::Connector
Did you mean? ConnectionPool
I’m not aware of what I might have inadvertently changed so that my system can no longer run tests. Redis is definitely running, so it’s not a side effect of redis not running.
I get this even when running tests on a clean checkout of tests-passed so it’s something about my environment, but I don’t know where to look first.
Sorry, my bad. I forgot to push I’ve updated the previous post with the correct commit.
And yes it means broken tests made it into tests-passed. Fortunately Discourse itself is fine - it’s the tests that need to be updated not any bugs in our application. Still, we are going to stop this from happening in the future.
Been there done that! Tests are now happily running.
Sorry I didn’t ask earlier. I know I’m outside the mainstream Discourse developer since I’m working on Fedora not Ubuntu, so I have a bias to assume there’s some environmental variant on my machine that is just different. Thanks for unlocking my testing!
I see there is disagreement about disabling those tests from commit 25db91e35180b2707ca4a9f7ffd173823f86f18d reverting you.
But it’s not because it is followed up by fixing the problem, because I tested at d775338d637d9ef3843acf227a138e8f11352151 which is master and tests-passed as of the moment I pulled, and the problem is back.
At least I got my tests passing locally and worked out what I had to do differently to handle the new safety mechanisms that I put into the migrate script.
@tgxworld what’s the plan for resolving the conflict? I guess I can just cherry-pick b1114b9a20343525c805d7339bd64954965a12f9 temporarily onto the base of my branch when I need to test in the meantime?
The tests were meant to be removed and I didn’t catch it because our CI had a bug where it wasn’t falling when it encounters an error. This has been fixed in