mirror of https://github.com/citusdata/citus.git
WIP test_multiple_databases_distributed_deadlock_detection
parent
76a2776fee
commit
3517850441
|
@ -1056,7 +1056,7 @@ class Postgres(QueryRunner):
|
||||||
def cleanup_databases(self):
|
def cleanup_databases(self):
|
||||||
for database in self.databases:
|
for database in self.databases:
|
||||||
self.sql(
|
self.sql(
|
||||||
sql.SQL("DROP DATABASE IF EXISTS {}").format(sql.Identifier(database))
|
sql.SQL("DROP DATABASE IF EXISTS {} WITH (FORCE)").format(sql.Identifier(database))
|
||||||
)
|
)
|
||||||
|
|
||||||
def cleanup_schemas(self):
|
def cleanup_schemas(self):
|
||||||
|
|
|
@ -25,7 +25,7 @@ async def test_multiple_databases_distributed_deadlock_detection(cluster):
|
||||||
for db_name in db_names:
|
for db_name in db_names:
|
||||||
nodes = cluster.workers + [cluster.coordinator]
|
nodes = cluster.workers + [cluster.coordinator]
|
||||||
for node in nodes:
|
for node in nodes:
|
||||||
node.sql(f"CREATE DATABASE {db_name}")
|
node.create_database(f"{db_name}")
|
||||||
with node.cur(dbname=db_name) as node_cursor:
|
with node.cur(dbname=db_name) as node_cursor:
|
||||||
node_cursor.execute("CREATE EXTENSION citus;")
|
node_cursor.execute("CREATE EXTENSION citus;")
|
||||||
if node == cluster.coordinator:
|
if node == cluster.coordinator:
|
||||||
|
|
Loading…
Reference in New Issue