From 56324aff42192b6839075fcc2442686fe879ed6d Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Fri, 1 Mar 2024 15:29:11 -0800 Subject: [PATCH] Clean up database branching test cases 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 40a384508a1..faf09a16f82 100644 --- a/edb/testbase/server.py +++ b/edb/testbase/server.py @@ -1073,20 +1073,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('_') if cls.get_setup_script(): @@ -1108,11 +1094,6 @@ async def setup_and_connect(cls): async with tr: await admin_conn.execute(create_command) - 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)