From 6eac586421caf8d5fac4c6788dd1e45ddda95f53 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Fri, 1 Mar 2024 15:41:40 -0800 Subject: [PATCH] Clean up database branching test cases (#6966) We don't need to query or set __internal_testmode in order to create a database from a template anymore. Clean up that code. This will also fix a flake, probably, but we *are* planning to fix it more properly (see #6349). --- edb/testbase/server.py | 19 ------------------- 1 file changed, 19 deletions(-) diff --git a/edb/testbase/server.py b/edb/testbase/server.py index a92ba8e1918..3f6795c95b6 100644 --- a/edb/testbase/server.py +++ b/edb/testbase/server.py @@ -1091,20 +1091,6 @@ async def setup_and_connect(cls): elif cls.uses_database_copies(): admin_conn = await cls.connect() - orig_testmode = await admin_conn.query( - 'SELECT cfg::Config.__internal_testmode', - ) - if not orig_testmode: - orig_testmode = False - else: - orig_testmode = orig_testmode[0] - - # Enable testmode to unblock the template database syntax below. - if not orig_testmode: - await admin_conn.execute( - 'CONFIGURE SESSION SET __internal_testmode := true;', - ) - base_db_name, _, _ = dbname.rpartition('_') # The retry here allows the test to survive a concurrent testing @@ -1124,11 +1110,6 @@ async def create_db(): ) await create_db() - if not orig_testmode: - await admin_conn.execute( - 'CONFIGURE SESSION SET __internal_testmode := false;', - ) - await admin_conn.aclose() cls.con = await cls.connect(database=dbname)