func TestConnectToExistingSentinelRedis(t *testing.T) { redis := NewTransport(getRedisSentinelHost(), getRedisMaster(), "input", "ouput") err := redis.Connect() if err != nil { t.Fatal("Expected connection not established.") } redis.Disconnect() }
func TestConnectToExistingSingleRedis(t *testing.T) { redis := NewRedisTransport(getRedisHost(), "", "input", "ouput") err := redis.Connect() if err != nil { t.Fatalf("Expected connection not established.") } redis.Disconnect() }
func TestSendingAndReceiveWithQueueSentinel(t *testing.T) { queueName := fmt.Sprintf("queue:test-%d", time.Now().UnixNano()) redis := NewTransport(getRedisSentinelHost(), getRedisMaster(), queueName, queueName) redis.Connect() log.Debugf("TestSendingAndReceiveWithQueueSingleHost.queueName: %s", queueName) sendAndReceiveWithQueueInternal(t, redis) defer redis.Disconnect() }
func TestDisconnectWithoutConnecting(t *testing.T) { redis := NewTransport(getRedisHost(), "", "input", "ouput") redis.Disconnect() // should not fail }