Skip to content

Commit a4a2ec3

Browse files
committed
Create pg_query_state extension in the case of TPC-DS test
1 parent 02049e1 commit a4a2ec3

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

tests/pg_qs_test_runner.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def teardown(con):
8383
def main(config):
8484
''' Main test function '''
8585
conn_params = {
86-
key:config.__dict__[key] for key in ('host', 'port', 'user', 'database', 'password')
86+
key:config.__dict__[key] for key in ('host', 'port', 'user', 'database', 'password')
8787
}
8888

8989
if config.use_tpcds:

tests/test_cases.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -526,14 +526,17 @@ def test_timing_buffers_conflicts(config):
526526
class DataLoadException(Exception): pass
527527
class StressTestException(Exception): pass
528528

529-
def load_tpcds_data(config):
530-
print('Loading TPC-DS data...')
529+
def setup_tpcds(config):
530+
print('Setting up TPC-DS test...')
531531
subprocess.call(['./tests/prepare_stress.sh'])
532532

533533
try:
534534
conn = psycopg2.connect(**config)
535535
cur = conn.cursor()
536536

537+
# Create pg_query_state extension
538+
cur.execute('CREATE EXTENSION IF NOT EXISTS pg_query_state')
539+
537540
# Create tables
538541
with open('tmp_stress/tpcds-kit/tools/tpcds.sql', 'r') as f:
539542
cur.execute(f.read())
@@ -561,7 +564,7 @@ def test_tpc_ds(config):
561564
global stress_in_progress
562565

563566
stress_in_progress = True
564-
load_tpcds_data(config)
567+
setup_tpcds(config)
565568

566569
print('Preparing TPC-DS queries...')
567570
# # Execute query in separate thread

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy