Fix test_seqscans on remote cluster (#2869)

A remote project is reused between tests, so we need to ensure that we
don't have a table with the same name already created.
This commit is contained in:
Alexander Bayandin
2022-11-19 23:39:42 +00:00
committed by GitHub
parent 684329d4d2
commit cb9b26776e

View File

@@ -33,6 +33,7 @@ from pytest_lazyfixture import lazy_fixture # type: ignore
def test_seqscans(env: PgCompare, rows: int, iters: int, workers: int):
with closing(env.pg.connect()) as conn:
with conn.cursor() as cur:
cur.execute("drop table if exists t;")
cur.execute("create table t (i integer);")
cur.execute(f"insert into t values (generate_series(1,{rows}));")