# Requesting help with failure finding DiscourseRedis::Connector running tests

**URL:** https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599
**Category:** Development
**Created:** [June 22, 2020, 6:29pm UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599 "2020-06-22T18:29:33Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [June 22, 2020, 6:29pm UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/1 "2020-06-22T18:29:34Z")

</div>

For the past some days, when I try to run tests locally, I am getting this error:

```plaintext
$ 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.

Any suggestions?

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 22, 2020, 8:36pm UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/2 "2020-06-22T20:36:31Z")

</div>

It looks like we managed to check in broken specs. I’ve disabled the broken specs in this commit:

[https://github.com/discourse/discourse/commit/b1114b9a20343525c805d7339bd64954965a12f9](https://github.com/discourse/discourse/commit/b1114b9a20343525c805d7339bd64954965a12f9)

But we have two follow up items:

1. Fix the broken specs
2. Make sure we can’t check these in again in the future.

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [June 22, 2020, 9:03pm UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/3 "2020-06-22T21:03:42Z")

</div>

Thanks for looking at this! Did the broken specs land on `tests-passed` because of intermittent problems?

I pulled, and on ac9577bcc7b69593bcdd204368d35492fc0cee15 I’m still seeing exactly the same error locally. So probably more than one problem. 😕

---

<div class="post-metadata">

### Author: ![eviltrout](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/eviltrout/32/5275_2.png) [@eviltrout](https://meta.discourse.org/u/eviltrout)
#### Post date: [June 22, 2020, 9:05pm UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/4 "2020-06-22T21:05:40Z")

</div>

Sorry, my bad. I forgot to push :facepalm: 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.

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [June 22, 2020, 9:13pm UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/5 "2020-06-22T21:13:55Z")

</div>

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!

---

<div class="post-metadata">

### Author: ![mcdanlj](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcdanlj/32/131829_2.png) [@mcdanlj](https://meta.discourse.org/u/mcdanlj)
#### Post date: [June 23, 2020, 2:11am UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/6 "2020-06-23T02:11:27Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [June 23, 2020, 4:12am UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/7 "2020-06-23T04:12:12Z")

</div>

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

[https://github.com/discourse/discourse/commit/add2a9411e7bb26b133a12bacc11a47c43e6f648](https://github.com/discourse/discourse/commit/add2a9411e7bb26b133a12bacc11a47c43e6f648)

---

<div class="post-metadata">

### Author: ![tgxworld](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tgxworld/32/106117_2.png) [@tgxworld](https://meta.discourse.org/u/tgxworld)
#### Post date: [June 23, 2020, 4:12am UTC](https://meta.discourse.org/t/requesting-help-with-failure-finding-discourseredis-connector-running-tests/155599/8 "2020-06-23T04:12:34Z")

</div>


