Verify that postings can be retrieved in multi-part lists.
(t *testing.T)
| 1306 | |
| 1307 | // Verify that postings can be retrieved in multi-part lists. |
| 1308 | func TestMultiPartListWithPostings(t *testing.T) { |
| 1309 | size := int(1e5) |
| 1310 | ol, commits := createMultiPartList(t, size, true) |
| 1311 | |
| 1312 | var facets []string |
| 1313 | err := ol.Iterate(uint64(size)+1, 0, func(p *pb.Posting) error { |
| 1314 | if len(p.Facets) > 0 { |
| 1315 | facets = append(facets, p.Facets[0].Key) |
| 1316 | } |
| 1317 | return nil |
| 1318 | }) |
| 1319 | require.NoError(t, err) |
| 1320 | require.Equal(t, commits, len(facets)) |
| 1321 | for i, facet := range facets { |
| 1322 | require.Equal(t, facet, strconv.Itoa(i+1)) |
| 1323 | } |
| 1324 | } |
| 1325 | |
| 1326 | // Verify marshaling of multi-part lists. |
| 1327 | func TestMultiPartListMarshal(t *testing.T) { |
nothing calls this directly
no test coverage detected
searching dependent graphs…