提交 80c350d4 编写于 作者: J Jacob Champion 提交者: Mark Sliva

gpconfig: improve test performance

Change to `gpstop -u` for a quick GUC reload as opposed to a full
restart during tests. This requires us to choose GUCs that can be
reloaded during a SIGHUP (e.g. change gp_resource_group_cpu_limit to
checkpoint_completion_target).
Co-authored-by: NMark Sliva <msliva@pivotal.io>
上级 4d06873f
@gpconfig
Feature: gpconfig integration tests
# Below, we use 2 change (-c) operations to prove that we have changed a file,
# because any existing postgresql.conf file could already have the first value in it a priori
# NOTE: since we are restarting the database with the given paramaters, do not change parameters
# that will cause the database to not restart given your machine setup.
# Below, we use 2 change (-c) operations to prove that we have changed a
# file, because any existing postgresql.conf file could already have the
# first value in it a priori
#
# NOTE: since we are SIGHUPing the database after each change (full restarts
# would be too slow), you must choose parameters with a sighup or weaker
# context.
@concourse_cluster
@demo_cluster
Scenario Outline: run each gpconfig command for guc type: <type>
Given the user runs "gpstop -ar"
Given the user runs "gpstop -u"
And gpstop should return a return code of 0
And the gpconfig context is setup
And the user runs "gpconfig -c <guc> -v <seed_value>"
And gpconfig should return a return code of 0
# ensure <guc> is set to <seed_value> for the tests below
And the user runs "gpstop -ar"
And the user runs "gpstop -u"
And gpstop should return a return code of 0
# set same value on master and segments
......@@ -48,7 +51,7 @@ Feature: gpconfig integration tests
And gpconfig should print "value: <seed_value> | file: <file_value_master>" escaped to stdout
And gpconfig should print "value: <seed_value> | file: <file_value>" escaped to stdout
When the user runs "gpstop -ar"
When the user runs "gpstop -u"
Then gpstop should return a return code of 0
# FIXME: a file string value of 'my_value' (quotes in file) has a live value of my_value (no quotes) and
......@@ -65,26 +68,26 @@ Feature: gpconfig integration tests
# test for each type documented for gpconfig
Examples:
| guc | type | seed_value | value | file_value | live_value | value_master_only | file_value_master_only | value_master | file_value_master | live_value_master |
| log_connections | bool | off | on | on | on | off | off | off | off | off |
| gp_resgroup_memory_policy | enum | eager_free | auto | auto | auto | eager_free | eager_free | eager_free | eager_free | eager_free |
| vacuum_cost_limit | integer | 300 | 400 | 400 | 400 | 555 | 555 | 500 | 500 | 500 |
| gp_resource_group_cpu_limit | real | 0.4 | 0.5 | 0.5 | 0.5 | 0.33 | 0.33 | 0.7 | 0.7 | 0.7 |
| application_name | string | xxxxxx | bodhi | 'bodhi' | bodhi | lucy | 'lucy' | bengie | 'bengie' | bengie |
| application_name | string | yyyyyy | 'bod hi' | 'bod hi' | bod hi | 'lu cy' | 'lu cy' | 'ben gie' | 'ben gie' | ben gie |
| application_name | string | zzzzzz | '' | '' | | '' | '' | '' | '' | |
| application_name | string | boo | "'\''" | '\\''' | \' | "'\''" | '\\''' | "'\''" | '\\''' | \' |
| guc | type | seed_value | value | file_value | live_value | value_master_only | file_value_master_only | value_master | file_value_master | live_value_master |
| log_connections | bool | off | on | on | on | off | off | off | off | off |
| gp_resgroup_memory_policy | enum | eager_free | auto | auto | auto | eager_free | eager_free | eager_free | eager_free | eager_free |
| vacuum_cost_limit | integer | 300 | 400 | 400 | 400 | 555 | 555 | 500 | 500 | 500 |
| checkpoint_completion_target | real | 0.4 | 0.5 | 0.5 | 0.5 | 0.33 | 0.33 | 0.7 | 0.7 | 0.7 |
| application_name | string | xxxxxx | bodhi | 'bodhi' | bodhi | lucy | 'lucy' | bengie | 'bengie' | bengie |
| application_name | string | yyyyyy | 'bod hi' | 'bod hi' | bod hi | 'lu cy' | 'lu cy' | 'ben gie' | 'ben gie' | ben gie |
| application_name | string | zzzzzz | '' | '' | | '' | '' | '' | '' | |
| application_name | string | boo | "'\''" | '\\''' | \' | "'\''" | '\\''' | "'\''" | '\\''' | \' |
@concourse_cluster
@demo_cluster
Scenario Outline: write directly to postgresql.conf file: <type>
Given the user runs "gpstop -ar"
Given the user runs "gpstop -u"
And gpstop should return a return code of 0
And the gpconfig context is setup
# we do this to make sure all segment files contain this <guc>, both in file and live
And the user runs "gpconfig -c <guc> -v <seed_value>"
And gpconfig should return a return code of 0
And the user runs "gpstop -ar"
And the user runs "gpstop -u"
And gpstop should return a return code of 0
When the user writes "<guc>" as "<value>" to the master config file
......@@ -95,7 +98,7 @@ Feature: gpconfig integration tests
Then gpconfig should return a return code of 0
And gpconfig should print "Master value: <file_value>" escaped to stdout
When the user runs "gpstop -ar"
When the user runs "gpstop -u"
Then gpstop should return a return code of 0
When the user runs "gpconfig -s <guc>"
......@@ -104,19 +107,19 @@ Feature: gpconfig integration tests
# NOTE: <value> is directly entered into postgresql.conf
Examples:
| guc | type | seed_value | value | file_value | live_value |
| log_connections | bool | off | on | on | on |
| gp_resgroup_memory_policy | enum | eager_free | auto | auto | auto |
| vacuum_cost_limit | integer | 300 | 400 | 400 | 400 |
| gp_resource_group_cpu_limit | real | 0.4 | 0.5 | 0.5 | 0.5 |
| application_name | string | xxxxxx | bodhi | bodhi | bodhi |
| application_name | string | xxxxxx | 'bod hi' | 'bod hi' | bod hi |
| application_name | string | xxxxxx | '' | '' | |
| guc | type | seed_value | value | file_value | live_value |
| log_connections | bool | off | on | on | on |
| gp_resgroup_memory_policy | enum | eager_free | auto | auto | auto |
| vacuum_cost_limit | integer | 300 | 400 | 400 | 400 |
| checkpoint_completion_target | real | 0.4 | 0.5 | 0.5 | 0.5 |
| application_name | string | xxxxxx | bodhi | bodhi | bodhi |
| application_name | string | xxxxxx | 'bod hi' | 'bod hi' | bod hi |
| application_name | string | xxxxxx | '' | '' | |
@concourse_cluster
@demo_cluster
Scenario Outline: gpconfig basic removal for type: <type>
Given the user runs "gpstop -ar"
Given the user runs "gpstop -u"
And gpstop should return a return code of 0
And the gpconfig context is setup
And the user runs "gpconfig -c <guc> -v <value>"
......@@ -133,11 +136,11 @@ Feature: gpconfig integration tests
And verify that the file "postgresql.conf" in each segment data directory has "some" line starting with "#<guc>="
Examples:
| guc | type | value |
| log_connections | bool | off |
| gp_resgroup_memory_policy | enum | eager_free |
| vacuum_cost_limit | integer | 300 |
| gp_resource_group_cpu_limit | real | 0.4 |
| application_name | string | bengie |
| application_name | string | 'ben gie' |
| application_name | string | '' |
| guc | type | value |
| log_connections | bool | off |
| gp_resgroup_memory_policy | enum | eager_free |
| vacuum_cost_limit | integer | 300 |
| checkpoint_completion_target | real | 0.4 |
| application_name | string | bengie |
| application_name | string | 'ben gie' |
| application_name | string | '' |
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册