PSetexEqualErr verify that the return value of the set operation is correct
(t *testing.T, key string, value string, delta int)
| 80 | |
| 81 | //PSetexEqualErr verify that the return value of the set operation is correct |
| 82 | func (es *ExampleString) PSetexEqual(t *testing.T, key string, value string, delta int) { |
| 83 | es.values[key] = value |
| 84 | reply, err := redis.String(es.conn.Do("PSETEX", key, delta, value)) |
| 85 | assert.Equal(t, "OK", reply) |
| 86 | assert.NoError(t, err) |
| 87 | data, err := redis.Bytes(es.conn.Do("GET", key)) |
| 88 | assert.Equal(t, value, string(data)) |
| 89 | assert.NoError(t, err) |
| 90 | time.Sleep(time.Millisecond * time.Duration(delta)) |
| 91 | data, err = redis.Bytes(es.conn.Do("GET", key)) |
| 92 | assert.Equal(t, "", string(data)) |
| 93 | } |
| 94 | |
| 95 | //SetRangeEqualErr verify that the return value of the set operation is correct |
| 96 | func (es *ExampleString) SetRangeEqual(t *testing.T, key string, value string) { |
no test coverage detected