<commit_before>package vshard

import (
	"testing"

	"github.com/stretchr/testify/suite"
)

type VShardCommandsTestSuite struct {
	suite.Suite
	Pool *Pool
}

func (suite *VShardCommandsTestSuite) SetupSuite() {
	suite.Pool = setupPool(suite.T())
}

func (suite *VShardCommandsTestSuite) TearDownTest() {
	tearDownPool(suite.T(), suite.Pool)
}

func (suite *VShardCommandsTestSuite) TestSetGet() {
	key := "x"
	expected := "hello-test"
	ok, err := suite.Pool.Set(key, 0, 0, []byte(expected))
	suite.True(ok)
	suite.NoError(err)

	value, err := suite.Pool.Get(key)
	suite.NoError(err)
	suite.Equal(expected, string(value))
}

func (suite *VShardCommandsTestSuite) TestGetInexistentKey() {
	key := "key-do-not-exist"
	value, err := suite.Pool.Get(key)
	suite.Equal(ErrKeyNotFound, err)
	suite.Empty(value)
}<commit_msg>updating get-set test<commit_after>package vshard

import (
	"testing"

	"github.com/stretchr/testify/suite"
)

type VShardCommandsTestSuite struct {
	suite.Suite
	Pool *Pool
}

func (suite *VShardCommandsTestSuite) SetupSuite() {
	suite.Pool = setupPool(suite.T())
}

func (suite *VShardCommandsTestSuite) TearDownTest() {
	tearDownPool(suite.T(), suite.Pool)
}

func (suite *VShardCommandsTestSuite) TestSetGet() {
	key := "get-set-key"
	expectedValue := "hello-test"
	ok, err := suite.Pool.Set(key, 0, 0, []byte(expectedValue))
	suite.True(ok)
	suite.NoError(err)

	value, err := suite.Pool.Get(key)
	suite.NoError(err)
	suite.Equal(expectedValue, string(value))
}

func (suite *VShardCommandsTestSuite) TestGetInexistentKey() {
	key := "key-do-not-exist"
	value, err := suite.Pool.Get(key)
	suite.Equal(ErrKeyNotFound, err)
	suite.Empty(value)
}
{'fraction_non_alphanumeric': 0.15195195195195196, 'fraction_numerical': 0.0024024024024024023, 'mean_word_length': 5.457364341085271, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1824896', 'n_tokens_mistral': 641, 'n_tokens_neox': 643, 'n_words': 116}