MCPcopy
hub / github.com/dgraph-io/badger / TestGetAfterDelete

Function TestGetAfterDelete

db_test.go:299–313  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

297}
298
299func TestGetAfterDelete(t *testing.T) {
300 runBadgerTest(t, nil, func(t *testing.T, db *DB) {
301 // populate with one entry
302 key := []byte("key")
303 txnSet(t, db, key, []byte("val1"), 0x00)
304 require.NoError(t, db.Update(func(txn *Txn) error {
305 err := txn.Delete(key)
306 require.NoError(t, err)
307
308 _, err = txn.Get(key)
309 require.Equal(t, ErrKeyNotFound, err)
310 return nil
311 }))
312 })
313}
314
315func TestTxnTooBig(t *testing.T) {
316 runBadgerTest(t, nil, func(t *testing.T, db *DB) {

Callers

nothing calls this directly

Calls 5

runBadgerTestFunction · 0.85
txnSetFunction · 0.85
UpdateMethod · 0.45
DeleteMethod · 0.45
GetMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…