(t *testing.T, edge *pb.DirectedEdge, l *posting.List)
| 42 | } |
| 43 | |
| 44 | func commitTransaction(t *testing.T, edge *pb.DirectedEdge, l *posting.List) { |
| 45 | startTs := timestamp() |
| 46 | txn := posting.Oracle().RegisterStartTs(startTs) |
| 47 | l = txn.Store(l) |
| 48 | l.SetTs(startTs) |
| 49 | require.NoError(t, l.AddMutationWithIndex(context.Background(), edge, txn)) |
| 50 | |
| 51 | commit := commitTs(startTs) |
| 52 | |
| 53 | txn.Update() |
| 54 | writer := posting.NewTxnWriter(pstore) |
| 55 | require.NoError(t, txn.CommitToDisk(writer, commit)) |
| 56 | require.NoError(t, writer.Flush()) |
| 57 | } |
| 58 | |
| 59 | func timestamp() uint64 { |
| 60 | return atomic.AddUint64(&ts, 1) |
no test coverage detected