Skip to content

Commit 85f40a0

Browse files
committed
now passing all integtests
1 parent 9d111d3 commit 85f40a0

File tree

5 files changed

+6
-7
lines changed

5 files changed

+6
-7
lines changed

env/pg_conn.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ def restart_with_changes(
346346

347347
# Set up Boot if we're told to do so
348348
if self.boot_config_fpath is not None:
349-
with open_and_save(self.dbgym_workspace, self.boot_config_fpath) as f:
349+
with self.dbgym_workspace.open_and_save(self.boot_config_fpath) as f:
350350
boot_config = yaml.safe_load(f)
351351

352352
self._set_up_boot(

env/tests/_set_up_gymlib_integtest_workspace.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
# the Postgres repo is very large and (b) the built binary will be different for different machines.
1212
# This script should be run from the base dbgym/ directory.
1313

14-
set -euo pipefail
14+
set -euxo pipefail
1515

1616
# INTENDED_DBDATA_HARDWARE can be set elsewhere (e.g. by tests_ci.yaml) but we use hdd by default.
1717
INTENDED_DBDATA_HARDWARE="${INTENDED_DBDATA_HARDWARE:-hdd}"

env/tests/integtest_workload.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
from benchmark.tpch.constants import DEFAULT_TPCH_SEED, NUM_TPCH_QUERIES
44
from env.tests.gymlib_integtest_util import GymlibIntegtestManager
55
from env.workload import Workload
6-
from util.workspace import fully_resolve_path, get_default_workload_path
76

87

98
class WorkloadTests(unittest.TestCase):

env/workload.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
from pathlib import Path
22

3-
from util.workspace import DBGymWorkspace, is_fully_resolved, open_and_save
3+
from util.workspace import DBGymWorkspace, is_fully_resolved
44

55

66
class Workload:
@@ -15,13 +15,13 @@ def __init__(self, dbgym_workspace: DBGymWorkspace, workload_dpath: Path) -> Non
1515

1616
assert order_fpath.exists()
1717

18-
with open_and_save(self.dbgym_workspace, order_fpath) as f:
18+
with self.dbgym_workspace.open_and_save(order_fpath) as f:
1919
for line in f:
2020
qid, qpath = line.strip().split(",")
2121
qpath = Path(qpath)
2222
assert is_fully_resolved(qpath)
2323

24-
with open_and_save(self.dbgym_workspace, qpath) as qf:
24+
with self.dbgym_workspace.open_and_save(qpath) as qf:
2525
self.queries[qid] = qf.read()
2626
self.query_order.append(qid)
2727

util/pg.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def sqlalchemy_conn_execute(
2828

2929

3030
def sql_file_queries(dbgym_workspace: DBGymWorkspace, filepath: Path) -> list[str]:
31-
with open_and_save(dbgym_workspace, filepath) as f:
31+
with dbgym_workspace.open_and_save(filepath) as f:
3232
lines: list[str] = []
3333
for line in f:
3434
if line.startswith("--"):

0 commit comments

Comments
 (0)