TODO(txn): Add tests after lru eviction
(t *testing.T)
| 230 | |
| 231 | // TODO(txn): Add tests after lru eviction |
| 232 | func TestAddMutation_Value(t *testing.T) { |
| 233 | key := x.DataKey(x.AttrInRootNamespace(x.AttrInRootNamespace("value")), 10) |
| 234 | ol, err := readPostingListFromDisk(key, ps, math.MaxUint64) |
| 235 | require.NoError(t, err) |
| 236 | edge := &pb.DirectedEdge{ |
| 237 | Value: []byte("oh hey there"), |
| 238 | } |
| 239 | txn := &Txn{StartTs: 1} |
| 240 | addMutationHelper(t, ol, edge, Set, txn) |
| 241 | checkValue(t, ol, "oh hey there", txn.StartTs) |
| 242 | |
| 243 | // Run the same check after committing. |
| 244 | require.NoError(t, ol.commitMutation(txn.StartTs, txn.StartTs+1)) |
| 245 | checkValue(t, ol, "oh hey there", uint64(3)) |
| 246 | |
| 247 | // The value made it to the posting list. Changing it now. |
| 248 | edge.Value = []byte(strconv.Itoa(119)) |
| 249 | txn = &Txn{StartTs: 3} |
| 250 | addMutationHelper(t, ol, edge, Set, txn) |
| 251 | checkValue(t, ol, "119", txn.StartTs) |
| 252 | } |
| 253 | |
| 254 | func TestAddMutation_jchiu1(t *testing.T) { |
| 255 | key := x.DataKey(x.AttrInRootNamespace(x.AttrInRootNamespace("value")), 12) |
nothing calls this directly
no test coverage detected