You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: action_test.go
    path of file: ./repos/Artalk/internal/cache
    
    the code of the file until where you have to start completion: package cache_test

import (
	"fmt"
	"sync"
	"testing"

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

func TestAction(t *testing.T) {
	cache := n
    
func TestQueryDBWithCache(t *testing.T) {
	cache := newCache(t)
	defer cache.Close()

	type user struct {
		Name  string
		Email string
	}

	const key = "data_key_233"
	var value = user{
		Name:  "qwqcode",
		Email: "artalkjs@example.com",
	}

	doCachedFind := func() bool {
		var data user
		dbQueried := false

		err := cache.QueryDBWithCache(key, &data, func() {
			// simulate db query result
			data = user{
				Name:  value.Name,
				Email: value.Email,
			}
			dbQueried = true
		})

		if assert.NoError(t, err) {
			assert.Equal(t, value, data)
		}

		return dbQueried
	}

	if dbQueried := doCachedFind(); dbQueried {
		assert.True(t, dbQueried, "first call `QueryDBWithCache`, db should be queried")
	}

	if dbQueried := doCachedFind(); dbQueried {
		assert.False(t, dbQueried, "second call `QueryDBWithCache`, db should not be queried")
	}

	t.Run("Concurrency", func(t *testing.T) {
		const numRoutines = 100

		var wg sync.WaitGroup
		wg.Add(numRoutines)

		for i := 0; i < numRoutines; i++ {
			go func() {
				defer wg.Done()

				dbQueried := doCachedFind()
				assert.False(t, dbQueried)
			}()
		}

		wg.Wait()
	})
}