Skip to content

Commit

Permalink
remove new vreplication tests that dont work with v15
Browse files Browse the repository at this point in the history
Signed-off-by: Austen Lacy <[email protected]>
  • Loading branch information
austenLacy committed Sep 18, 2023
1 parent 75e2811 commit 1b2ba1f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 34 deletions.
31 changes: 0 additions & 31 deletions go/test/endtoend/vreplication/vreplication_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -215,37 +215,6 @@ func testBasicVreplicationWorkflow(t *testing.T) {
expectNumberOfStreams(t, vtgateConn, "Customer3to2", "sales", "product:0", 3)
reshardCustomer3to1Merge(t)
expectNumberOfStreams(t, vtgateConn, "Customer3to1", "sales", "product:0", 1)

t.Run("Verify CopyState Is Optimized Afterwards", func(t *testing.T) {
tabletMap := vc.getVttabletsInKeyspace(t, defaultCell, "customer", topodatapb.TabletType_PRIMARY.String())
require.NotNil(t, tabletMap)
require.Greater(t, len(tabletMap), 0)
for _, tablet := range tabletMap {
verifyCopyStateIsOptimized(t, tablet)
}
})

t.Run("Test CreateLookupVindex", func(t *testing.T) {
// CreateLookupVindex does not support noblob images.
if strings.ToLower(binlogRowImage) == "noblob" {
return
}
_, err = vtgateConn.ExecuteFetch("use customer", 1, false)
require.NoError(t, err, "error using customer keyspace: %v", err)
res, err := vtgateConn.ExecuteFetch("select count(*) from customer where name is not null", 1, false)
require.NoError(t, err, "error getting current row count in customer: %v", err)
require.Equal(t, 1, len(res.Rows), "expected 1 row in count(*) query, got %d", len(res.Rows))
rows, _ := res.Rows[0][0].ToInt32()
// Insert a couple of rows with a NULL name to confirm that they
// are ignored.
insert := "insert into customer (cid, name, typ, sport, meta) values (100, NULL, 'soho', 'football','{}'), (101, NULL, 'enterprise','baseball','{}')"
_, err = vtgateConn.ExecuteFetch(insert, -1, false)
require.NoError(t, err, "error executing %q: %v", insert, err)
err = vc.VtctlClient.ExecuteCommand("CreateLookupVindex", "--", "--tablet_types=PRIMARY", "customer", createLookupVindexVSchema)
require.NoError(t, err, "error executing CreateLookupVindex: %v", err)
waitForWorkflowState(t, vc, "product.customer_name_keyspace_id_vdx", binlogdatapb.VReplicationWorkflowState_Stopped.String())
waitForRowCount(t, vtgateConn, "product", "customer_name_keyspace_id", int(rows))
})
}

func TestV2WorkflowsAcrossDBVersions(t *testing.T) {
Expand Down
4 changes: 1 addition & 3 deletions go/vt/wrangler/materializer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1279,10 +1279,8 @@ func TestCreateLookupVindexIgnoreNulls(t *testing.T) {
SourceKeyspace: "ks",
TargetKeyspace: "ks",
}
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

env := newTestMaterializerEnv(t, ctx, ms, []string{"0"}, []string{"0"})
env := newTestMaterializerEnv(t, ms, []string{"0"}, []string{"0"})
defer env.close()

specs := &vschemapb.Keyspace{
Expand Down

0 comments on commit 1b2ba1f

Please sign in to comment.