Conversation
Codecov Report
@@ Coverage Diff @@
## master #17 +/- ##
===========================================
+ Coverage 77.09% 88.86% +11.77%
===========================================
Files 4 2 -2
Lines 502 503 +1
===========================================
+ Hits 387 447 +60
+ Misses 115 56 -59
Continue to review full report at Codecov.
|
And add option to run TPC-DS stress test separately.
Also refactor common functions for python tests
| MAX_FIRST_GETTING_QS_RETRIES = 10 | ||
| PG_QS_DELAY, BEFORE_GETTING_QS_DELAY = 0.1, 0.1 | ||
| BEFORE_GETTING_QS, GETTING_QS = range(2) |
There was a problem hiding this comment.
These look like constants, so I would prefer to move them to the place near TPC_DS_EXCLUDE_LIST
| parser.add_argument('--tpc-ds-setup', dest='tpcds_setup', action='store_true', help='setup database to run TPC-DS benchmark') | ||
| parser.add_argument('--tpc-ds-run', dest='tpcds_run', action='store_true', help='run only stress test based on TPC-DS benchmark') |
There was a problem hiding this comment.
Why do you separate TPC-DS run and setup? You cannot run tests without a setup I guess. And what is the point to setup without run?
There was a problem hiding this comment.
Because the whole task(TPC-DS running) is huge and its running takes much time. Clearly, it have to be decomposed to separate subtasks so to be able to run their more granular. This separation is the fist step to achieve it. In particular, it provides to run tpc-ds bench multiple times for debugging purpose without initializing database at all time.
Yes, tpc-ds-run requires tpc-ds-setup and fails until database is initialized properly.
tests/common.py
Outdated
| @@ -0,0 +1,103 @@ | |||
| ''' | |||
| common.py | |||
| Copyright (c) 2016-2019, Postgres Professional | |||
There was a problem hiding this comment.
I guess you can put 2020 everywhere already :)
tests/tpcds.py
Outdated
| import common | ||
| import os | ||
| import progressbar | ||
| import psycopg2.extensions | ||
| import subprocess | ||
| import time |
There was a problem hiding this comment.
I would prefer following order (built-in library first, extra modules second, local modules last):
import os
import time
import subprocess
import psycopg2.extensions
import progressbar
import .commonJust for cleanliness
I have tried to focus here only on adding TPC-DS tests. Sergey's solution from #16 was reworked. The key point was to add TPC-DS without affecting all previous test cases.
The following new features added: