add TestMain for a few storages and update benchmark workflow

This commit is contained in:
Muhammed Efe Cetin
2023-09-15 10:58:04 +03:00
parent 55eca1c7b2
commit 36dd674d93
17 changed files with 305 additions and 227 deletions

View File

@@ -1,13 +1,25 @@
package memcache
import (
"os"
"testing"
"time"
"github.com/stretchr/testify/require"
)
var testStore = New()
var testStore *Storage
func TestMain(m *testing.M) {
testStore = New(Config{
Reset: true,
})
code := m.Run()
_ = testStore.Close()
os.Exit(code)
}
func Test_Memcache_Set(t *testing.T) {
var (