3
3
4
4
import psycopg
5
5
6
- from env .integtest_util import IntegtestWorkspace
6
+ from env .integtest_util import (
7
+ INTEGTEST_BENCHMARK ,
8
+ INTEGTEST_SCALE_FACTOR ,
9
+ IntegtestWorkspace ,
10
+ )
7
11
from env .pg_conn import PostgresConn
8
12
from util .pg import (
9
13
DEFAULT_POSTGRES_PORT ,
12
16
)
13
17
from util .workspace import (
14
18
DEFAULT_BOOT_CONFIG_FPATH ,
15
- DBGymConfig ,
16
19
default_dbdata_parent_dpath ,
17
20
default_pgbin_path ,
18
21
default_pristine_dbdata_snapshot_path ,
19
22
)
20
23
21
- BENCHMARK = "tpch"
22
- SCALE_FACTOR = 0.01
23
-
24
24
25
25
class PostgresConnTests (unittest .TestCase ):
26
- dbgym_cfg : DBGymConfig
27
-
28
26
@staticmethod
29
27
def setUpClass () -> None :
30
28
IntegtestWorkspace .set_up_workspace ()
@@ -36,16 +34,14 @@ def setUp(self) -> None:
36
34
+ "to ensure this. Be careful about accidentally taking down other people's Postgres instances though." ,
37
35
)
38
36
self .pristine_dbdata_snapshot_path = default_pristine_dbdata_snapshot_path (
39
- IntegtestWorkspace .get_dbgym_cfg (). dbgym_workspace_path ,
40
- BENCHMARK ,
41
- SCALE_FACTOR ,
37
+ IntegtestWorkspace .get_workspace_path () ,
38
+ INTEGTEST_BENCHMARK ,
39
+ INTEGTEST_SCALE_FACTOR ,
42
40
)
43
41
self .dbdata_parent_dpath = default_dbdata_parent_dpath (
44
- IntegtestWorkspace .get_dbgym_cfg ().dbgym_workspace_path
45
- )
46
- self .pgbin_dpath = default_pgbin_path (
47
- IntegtestWorkspace .get_dbgym_cfg ().dbgym_workspace_path
42
+ IntegtestWorkspace .get_workspace_path ()
48
43
)
44
+ self .pgbin_dpath = default_pgbin_path (IntegtestWorkspace .get_workspace_path ())
49
45
50
46
# The reason we restart Postgres every time is to ensure a "clean" starting point
51
47
# so that all tests are independent of each other.
0 commit comments