Skip to content

Commit 353c2ca

Browse files
committed
logictest: reset role before doing post-test checks
This makes sure we run the checks with the root user. Release note: None
1 parent 6155338 commit 353c2ca

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

pkg/sql/logictest/logic.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3826,10 +3826,12 @@ func (t *logicTest) validateAfterTestCompletion() error {
38263826
// txn and second we reset vectorize mode in case it was switched to
38273827
// `experimental_always`.
38283828
_, _ = t.db.Exec("ROLLBACK")
3829-
_, err := t.db.Exec("RESET vectorize")
3830-
if err != nil {
3829+
if _, err := t.db.Exec("RESET vectorize"); err != nil {
38313830
t.Fatal(errors.Wrap(err, "could not reset vectorize mode"))
38323831
}
3832+
if _, err := t.db.Exec("RESET ROLE"); err != nil {
3833+
t.Fatal(errors.Wrap(err, "could not reset role"))
3834+
}
38333835

38343836
validate := func() (string, error) {
38353837
rows, err := t.db.Query(`SELECT * FROM "".crdb_internal.invalid_objects ORDER BY id`)

0 commit comments

Comments
 (0)