MCPcopy Index your code
hub / github.com/dgraph-io/dgraph / testVectorMutationDiffrentLength

Function testVectorMutationDiffrentLength

query/vector/vector_test.go:370–383  ·  view source on GitHub ↗
(t *testing.T, err string)

Source from the content-addressed store, hash-verified

368}
369
370func testVectorMutationDiffrentLength(t *testing.T, err string) {
371 rdf := `<0x1> <vtest> "[1.5]" .
372 <0x2> <vtest> "[1.5, 2.0]" .
373 <0x3> <vtest> "[1.5, 2.0, 3.0]" .
374 <0x4> <vtest> "[1.5, 2.0, 3.0, 4.5]" .
375 <0x5> <vtest> "[1.5, 2.0, 3.0, 4.5, 5.0]" .
376 <0x6> <vtest> "[1.5, 2.0, 3.0, 4.5, 5.0, 6.5]" .
377 <0x7> <vtest> "[1.5, 2.0, 3.0, 4.5, 5.0, 6.5, 7.0]" .
378 <0x8> <vtest> "[1.5, 2.0, 3.0, 4.5, 5.0, 6.5, 7.0, 8.5]" .
379 <0x9> <vtest> "[1.5, 2.0, 3.0, 4.5, 5.0, 6.5, 7.0, 8.5, 9.0]" .
380 <0xA> <vtest> "[1.5, 2.0, 3.0, 4.5, 5.0, 6.5, 7.0, 8.5, 9.0, 10.5]" .`
381
382 require.ErrorContains(t, addTriplesToCluster(rdf), err)
383}
384
385func TestInvalidVectorIndex(t *testing.T) {
386 dropPredicate("vtest")

Calls 1

addTriplesToClusterFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…