INNER CODE UNIT · Go
TestStoreConcurrent
philippgille/gokv · badgerdb/badgerdb_test.go:52
func TestStoreConcurrent(t *testing.T) {
store, path := createStore(t, encoding.JSON)
defer cleanUp(store, path)
goroutineCount := 1000
test.TestConcurrentInteractions(t, goroutineCount, store)
}
// TestErrors tests some error cases.
func TestErrors(t *testing.T) {
// Test empty key
store, path := createStore(t, encoding.JSON)
defer cleanUp(store, path)
err := store.Set("", "bar")
if err == nil {
t.Error("Expected an error")
}