Skip to content

Commit

Permalink
now passing all integtests
Browse files Browse the repository at this point in the history
  • Loading branch information
wangpatrick57 committed Dec 30, 2024
1 parent 9d111d3 commit 85f40a0
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion env/pg_conn.py
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,7 @@ def restart_with_changes(

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

self._set_up_boot(
Expand Down
2 changes: 1 addition & 1 deletion env/tests/_set_up_gymlib_integtest_workspace.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# the Postgres repo is very large and (b) the built binary will be different for different machines.
# This script should be run from the base dbgym/ directory.

set -euo pipefail
set -euxo pipefail

# INTENDED_DBDATA_HARDWARE can be set elsewhere (e.g. by tests_ci.yaml) but we use hdd by default.
INTENDED_DBDATA_HARDWARE="${INTENDED_DBDATA_HARDWARE:-hdd}"
Expand Down
1 change: 0 additions & 1 deletion env/tests/integtest_workload.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from benchmark.tpch.constants import DEFAULT_TPCH_SEED, NUM_TPCH_QUERIES
from env.tests.gymlib_integtest_util import GymlibIntegtestManager
from env.workload import Workload
from util.workspace import fully_resolve_path, get_default_workload_path


class WorkloadTests(unittest.TestCase):
Expand Down
6 changes: 3 additions & 3 deletions env/workload.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from pathlib import Path

from util.workspace import DBGymWorkspace, is_fully_resolved, open_and_save
from util.workspace import DBGymWorkspace, is_fully_resolved


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

assert order_fpath.exists()

with open_and_save(self.dbgym_workspace, order_fpath) as f:
with self.dbgym_workspace.open_and_save(order_fpath) as f:
for line in f:
qid, qpath = line.strip().split(",")
qpath = Path(qpath)
assert is_fully_resolved(qpath)

with open_and_save(self.dbgym_workspace, qpath) as qf:
with self.dbgym_workspace.open_and_save(qpath) as qf:
self.queries[qid] = qf.read()
self.query_order.append(qid)

Expand Down
2 changes: 1 addition & 1 deletion util/pg.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def sqlalchemy_conn_execute(


def sql_file_queries(dbgym_workspace: DBGymWorkspace, filepath: Path) -> list[str]:
with open_and_save(dbgym_workspace, filepath) as f:
with dbgym_workspace.open_and_save(filepath) as f:
lines: list[str] = []
for line in f:
if line.startswith("--"):
Expand Down

0 comments on commit 85f40a0

Please sign in to comment.