RSpec failure about redis

I’ve just run RSPEC and I got 2 failure
It seems to be redis setting problems, but I have no idea
Please give me some advice about this.

Failures:

  1) DiscourseRedis DiscourseRedis::FallbackHandler#initiate_fallback_to_master should restrict the number of checks
     Failure/Error: expect(fallback_handler.master).to eq(true)

       expected: true
            got: false

       (compared using ==)
     # ./spec/components/discourse_redis_spec.rb:106:in `block (4 levels) in <top (required)>'

  2) DiscourseRedis DiscourseRedis::Connector should return the master config when master is up
     Failure/Error: client.call([:role])[0]

     Redis::CommandError:
       ERR unknown command 'role'
     # ./lib/discourse_redis.rb:107:in `resolve'
     # ./spec/components/discourse_redis_spec.rb:40:in `block (3 levels) in <top (required)>'

Looks like you are running an old version of redis, upgrade to latest.

2 Likes

Thanks!! I Appreciate about your help!!!
As You Said, I Upgraded Redis-server v2.8.X to v3.2.6.
But 1 Failure still left ㅠㅠ

  1) DiscourseRedis DiscourseRedis::Connector should return the master config when master is up
     Failure/Error: client.call([:role])[0]

     Redis::CommandError:
       ERR unknown command 'role'
     # ./lib/discourse_redis.rb:107:in `resolve'
     # ./spec/components/discourse_redis_spec.rb:40:in `block (3 levels) in <top (required)>'

Is There any specific config about redis-server on discourse??

1 Like

I solved it!! It was my mistake.
I didn’t remove current version of redis before installed redis stable version(3.2.X)
so I guess new version of redis on ubuntu didn’t run.
Thanks!!

3 Likes