MCPcopy
hub / github.com/etcd-io/etcd / execTransaction

Function execTransaction

server/etcdserver/api/v3rpc/validationfuzz_test.go:164–182  ·  view source on GitHub ↗
(t *testing.T, req *pb.RequestOp)

Source from the content-addressed store, hash-verified

162}
163
164func execTransaction(t *testing.T, req *pb.RequestOp) {
165 b, _ := betesting.NewDefaultTmpBackend(t)
166 defer betesting.Close(t, b)
167 s := mvcc.NewStore(zaptest.NewLogger(t), b, &lease.FakeLessor{}, mvcc.StoreConfig{})
168 defer s.Close()
169
170 // setup cancelled context
171 ctx, cancel := context.WithCancel(context.TODO())
172 cancel()
173
174 request := &pb.TxnRequest{
175 Success: []*pb.RequestOp{req},
176 }
177
178 _, _, err := txn.Txn(ctx, zaptest.NewLogger(t), request, false, s, &lease.FakeLessor{})
179 if err != nil {
180 t.Skipf("Application erroring. %s", err.Error())
181 }
182}

Callers 3

FuzzTxnRangeRequestFunction · 0.85
FuzzTxnPutRequestFunction · 0.85

Calls 3

CloseMethod · 0.65
TxnMethod · 0.65
ErrorMethod · 0.65

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…