Skip to content

Commit 459a060

Browse files
committed
Use committed TPC-DS queries for now
1 parent bbc89f5 commit 459a060

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.travis.yml

+2
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ env:
2727
- PG_VERSION=9.6 LEVEL=hardcore
2828
- PG_VERSION=9.6
2929
- PG_VERSION=12 LEVEL=stress
30+
- PG_VERSION=11 LEVEL=stress
31+
- PG_VERSION=10 LEVEL=stress
3032

3133
matrix:
3234
allow_failures:

tests/test_cases.py

+12-2
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,19 @@ def pg_query_state(config, pid, verbose=False, costs=False, timing=False, \
9898

9999
conn = psycopg2.connect(**config)
100100
curs = conn.cursor()
101+
set_guc(conn, 'statement_timeout', 10000)
102+
101103
result = []
104+
n_retries = 0
102105
while not result:
103106
curs.callproc('pg_query_state', (pid, verbose, costs, timing, buffers, triggers, format))
104107
result = curs.fetchall()
108+
n_retries += 1
109+
110+
if n_retries == 25:
111+
print('pg_query_state tried 25 times with no effect')
112+
break
113+
105114
notices = conn.notices[:]
106115
conn.close()
107116
return result
@@ -544,7 +553,8 @@ def stress_test(config):
544553

545554
print('Preparing TPC-DS queries...')
546555
# Execute query in separate thread
547-
with open('tmp_stress/tpcds-kit/tools/query_0.sql', 'r') as f:
556+
# with open('tmp_stress/tpcds-kit/tools/query_0.sql', 'r') as f:
557+
with open('tests/query_tpcds.sql', 'r') as f:
548558
sql = f.read()
549559

550560
queries = sql.split(';')
@@ -557,7 +567,7 @@ def stress_test(config):
557567

558568
print('Starting test...')
559569
timeout_list = []
560-
exclude_list = [2]
570+
exclude_list = []
561571
bar = progressbar.ProgressBar(max_value=len(queries))
562572
for i, query in enumerate(queries):
563573
bar.update(i + 1)

0 commit comments

Comments
 (0)