title: Strange behaviour using ioredis or node_redis when testing hset and hget
body: <p>Hoping someone could shed some light on this.  I can't for the life of me find what the problem is.</p>
  
  <p><strong>Problem:</strong></p>
  
  <p>I am trying to add a value to Redis in one file using <em>hset</em> and get that value in a different file using <em>hget</em>.  What ends up happening in the test case is that the value is set but <em>hget</em> returns null as if nothing was there.</p>
  
  <p><strong>Attempt:</strong></p>
  
  <p>The really weird part happens when I try to get the value immediately after setting it in the <strong>same</strong> file.  It actually works as normal!  Check this out...</p>
  
  <pre><code>// FYI: This is co-mocha so the generator function is okay
  describe('Route', () =&gt; {
    it('should return the value currently set in Redis', function* () {
      const link = 'this-is-a-link';
      yield redis.hset('i:metadata', 'stream', link); // using ioredis
      const response = yield request.send(); // requests to my Koa server
      expect(response.body.stream).to.equal(link); // expected null to equal 'this-is-a-link'
    });
  });
  </code></pre>
  
  <p>and you can see the route is simply...</p>
  
  <pre><code>// FYI: This is a Koa route reference with a HTTP GET on '/'
  exports.get = function* () {
    const stream = yield redis.hget('i:metadata', 'stream'); // using ioredis
    this.body = { stream }; // holds a value of null
  };
  </code></pre>
  
  <p>If I insert that <em>hget</em> immediately below my <em>hset</em> in my test case the value is retrieved perfectly.  Does anyone have any ideas on how to fix this?</p>
  
  <p><strong>Note:</strong></p>
  
  <p>Before anyone suggests, I have already listened for the connected event and that shouldn't matter because I can <em>hget</em> the value immediately below the <em>hset</em> and it works.  This problem also persists with a promisified <em>node_redis</em> install.</p>
  
  <p>Thanks!</p>