MCPcopy Create free account
hub / github.com/nutsdb/nutsdb / TestTx_CommittedStatus

Function TestTx_CommittedStatus

tx_test.go:134–155  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

132}
133
134func TestTx_CommittedStatus(t *testing.T) {
135
136 withRAMIdxDB(t, func(t *testing.T, db *DB) {
137
138 bucket := "bucket_committed_status"
139
140 { // setup data
141 txCreateBucket(t, db, DataStructureBTree, bucket, nil)
142 tx, err := db.Begin(true)
143 assert.NoError(t, err)
144
145 err = tx.Put(bucket, []byte("key1"), []byte("value1"), 0)
146 assert.NoError(t, err)
147
148 err = tx.Put(bucket, []byte("key2"), []byte("value2"), 0)
149 assert.NoError(t, err)
150
151 err = tx.Commit()
152 assert.NoError(t, err)
153 }
154 })
155}
156
157func TestTx_PutWithTimestamp(t *testing.T) {
158 withDefaultDB(t, func(t *testing.T, db *DB) {

Callers

nothing calls this directly

Calls 5

withRAMIdxDBFunction · 0.85
txCreateBucketFunction · 0.85
BeginMethod · 0.80
CommitMethod · 0.80
PutMethod · 0.45

Tested by

no test coverage detected