You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
go-zero/core/stores/redis/redisblockingnode_test.go

20 lines
396 B
Go

package redis
import (
"testing"
"github.com/alicebob/miniredis/v2"
"github.com/stretchr/testify/assert"
)
func TestBlockingNode(t *testing.T) {
r, err := miniredis.Run()
assert.Nil(t, err)
node, err := CreateBlockingNode(NewRedis(r.Addr(), NodeType))
assert.Nil(t, err)
node.Close()
node, err = CreateBlockingNode(NewRedis(r.Addr(), ClusterType))
assert.Nil(t, err)
node.Close()
}