提交 db47b998 编写于 作者: K Kalen Krempely 提交者: Kalen Krempely

Behave: Rename step for accuracy

Remove "user kills a primary postmaster process" in favor of the more
generic equivalent step "user stops all {segment_type} processes" which
can take either a primary or mirror.

For clarity and accuracy rename "user kills all {segment_type}
processes" to "user stops all {segment_type} processes".

(cherry picked from commit 8eb9dffb726a9218166af9ba06a91efb7c492826)
上级 9c9c413c
......@@ -10,7 +10,7 @@ Feature: Tests for gpaddmirrors
Then verify the database has mirrors
And the tablespace is valid
When user kills all primary processes
When user stops all primary processes
And user can start transactions
Then the tablespace is valid
......@@ -103,7 +103,7 @@ Feature: Tests for gpaddmirrors
And gpaddmirrors adds mirrors with temporary data dir
And an FTS probe is triggered
And the segments are synchronized
When user kills all primary processes with SIGKILL
When user stops all primary processes
And user can start transactions
Then verify that there is a "heap" table "public.heap_table" in "gptest" with "100" rows
Then verify that there is a "ao" table "public.ao_table" in "gptest" with "100" rows
......
......@@ -5,7 +5,7 @@ Feature: gprecoverseg tests
Scenario: incremental recovery works with tablespaces
Given the database is running
And a tablespace is created with data
And user kills a primary postmaster process
And user stops all primary processes
And user can start transactions
When the user runs "gprecoverseg -a"
Then gprecoverseg should return a return code of 0
......@@ -23,7 +23,7 @@ Feature: gprecoverseg tests
Scenario: full recovery works with tablespaces
Given the database is running
And a tablespace is created with data
And user kills a primary postmaster process
And user stops all primary processes
And user can start transactions
When the user runs "gprecoverseg -a -F"
Then gprecoverseg should return a return code of 0
......@@ -39,7 +39,7 @@ Feature: gprecoverseg tests
Scenario: gprecoverseg should not output bootstrap error on success
Given the database is running
And user kills a primary postmaster process
And user stops all primary processes
And user can start transactions
When the user runs "gprecoverseg -a"
Then gprecoverseg should return a return code of 0
......@@ -54,7 +54,7 @@ Feature: gprecoverseg tests
Given the database is running
And all the segments are running
And the segments are synchronized
And user kills all mirror processes
And user stops all mirror processes
When user can start transactions
And the user runs "gprecoverseg -F -a -s"
Then gprecoverseg should return a return code of 0
......@@ -67,7 +67,7 @@ Feature: gprecoverseg tests
Given the database is running
And all the segments are running
And the segments are synchronized
And user kills all mirror processes
And user stops all mirror processes
When user can start transactions
And the user runs "gprecoverseg -F -a --no-progress"
Then gprecoverseg should return a return code of 0
......@@ -82,7 +82,7 @@ Feature: gprecoverseg tests
And the segments are synchronized
And the "primary" segment information is saved
When the postmaster.pid file on "primary" segment is saved
And user kills a primary postmaster process
And user stops all primary processes
When user can start transactions
And the background pid is killed on "primary" segment
And we run a sample background script to generate a pid on "primary" segment
......@@ -106,7 +106,7 @@ Feature: gprecoverseg tests
And the segments are synchronized
And the "primary" segment information is saved
When the postmaster.pid file on "primary" segment is saved
And user kills a primary postmaster process
And user stops all primary processes
When user can start transactions
And we generate the postmaster.pid file with a non running pid on the same "primary" segment
And the user runs "gprecoverseg -a"
......@@ -137,7 +137,7 @@ Feature: gprecoverseg tests
And the segments are synchronized
And the "primary" segment information is saved
When the postmaster.pid file on "primary" segment is saved
And user kills a primary postmaster process
And user stops all primary processes
When user can start transactions
And the background pid is killed on "primary" segment
And we run a sample background script to generate a pid on "primary" segment
......
......@@ -4,7 +4,7 @@ Feature: gpstate tests
Scenario: gpstate -b logs cluster for a cluster where the mirrors failed over to primary
Given a standard local demo cluster is running
And the database is running
When user kills all primary processes
When user stops all primary processes
And user can start transactions
And the user runs "gpstate -b"
Then gpstate output has rows with keys values
......@@ -42,7 +42,7 @@ Feature: gpstate tests
Scenario: gpstate -c logs cluster info for a cluster where all mirrors are failed over
Given a standard local demo cluster is running
And the database is running
When user kills all primary processes
When user stops all primary processes
And user can start transactions
And the user runs "gpstate -c"
Then gpstate output looks like
......@@ -54,7 +54,7 @@ Feature: gpstate tests
Scenario: gpstate -c logs cluster info for a cluster that is unsynchronized
Given a standard local demo cluster is running
When user kills all mirror processes
When user stops all mirror processes
And an FTS probe is triggered
And the user runs "gpstate -c"
Then gpstate output looks like
......@@ -104,7 +104,7 @@ Feature: gpstate tests
Scenario: gpstate -e logs errors when mirrors have failed over
Given a standard local demo cluster is running
And user kills all primary processes
And user stops all primary processes
And user can start transactions
When the user runs "gpstate -e"
Then gpstate should print "Segments with Primary and Mirror Roles Switched" to stdout
......@@ -199,7 +199,7 @@ Feature: gpstate tests
Scenario: gpstate -m warns when mirrors have failed over to primary
Given a standard local demo cluster is running
And user kills all primary processes
And user stops all primary processes
And user can start transactions
When the user runs "gpstate -m"
Then gpstate should print "Current GPDB mirror list and status" to stdout
......@@ -349,7 +349,7 @@ Feature: gpstate tests
Scenario: gpstate -i warns if any mirrors are marked down
Given a standard local demo cluster is running
And user kills all mirror processes
And user stops all mirror processes
And an FTS probe is triggered
When the user runs "gpstate -i"
Then gpstate output looks like
......@@ -366,7 +366,7 @@ Feature: gpstate tests
Scenario: gpstate -i warns if any up mirrors cannot be contacted
Given a standard local demo cluster is running
And user kills all mirror processes
And user stops all mirror processes
# We intentionally do not wait for an FTS probe here; we want the
# mirrors to still be marked up when we try to get their version.
When the user runs "gpstate -i"
......
......@@ -812,16 +812,9 @@ def _process_exists(pid, host):
return cmd.get_return_code() == 0
@given('user kills a primary postmaster process')
@when('user kills a primary postmaster process')
@then('user kills a primary postmaster process')
def impl(context):
stop_segments(context, "primary")
@given('user kills all {segment_type} processes')
@when('user kills all {segment_type} processes')
@then('user kills all {segment_type} processes')
@given('user stops all {segment_type} processes')
@when('user stops all {segment_type} processes')
@then('user stops all {segment_type} processes')
def stop_segments(context, segment_type):
if segment_type not in ("primary", "mirror"):
raise Exception("Expected segment_type to be 'primary' or 'mirror', but found '%s'." % segment_type)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册