Skip to content

Commit

Permalink
test: updated shard targeted ddl test
Browse files Browse the repository at this point in the history
Signed-off-by: Harshit Gangal <[email protected]>
  • Loading branch information
harshit-gangal committed Sep 10, 2024
1 parent 59c8346 commit 4f8f162
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion go/test/endtoend/vtgate/misc_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -807,7 +807,13 @@ func TestDDLTargeted(t *testing.T) {
utils.Exec(t, conn, "use `ks/-80`")
utils.Exec(t, conn, `begin`)
utils.Exec(t, conn, `create table ddl_targeted (id bigint primary key)`)
utils.Exec(t, conn, `commit`)
// implicit commit on ddl would have closed the open transaction
// so this execution should happen as autocommit.
utils.Exec(t, conn, `insert into ddl_targeted (id) values (1)`)
// this will have not impact and the row would have inserted.
utils.Exec(t, conn, `rollback`)
// validating the row
utils.AssertMatches(t, conn, `select id from ddl_targeted`, `[[INT64(1)]]`)
}

func TestLookupErrorMetric(t *testing.T) {
Expand Down

0 comments on commit 4f8f162

Please sign in to comment.