You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudberry.apache.org by yj...@apache.org on 2025/02/19 02:57:54 UTC

(cloudberry) 03/08: Test fix failure by adding timeeout and fixing test steps. (#14589)

This is an automated email from the ASF dual-hosted git repository.

yjhjstz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/cloudberry.git

commit abce4a7298a552f7bd04c18e38ae326ea3d84d94
Author: Piyush Chandwadkar <65...@users.noreply.github.com>
AuthorDate: Tue Jan 10 10:00:58 2023 +0530

    Test fix failure by adding timeeout and fixing test steps. (#14589)
    
    Some of the gpmovemirror and gprecoverseg tests seen failing
    when waiting for segment to come online or waiting for progress
    file to get created. Enhancing timeout for such cases.
    Also when gprecoverseg when ran in async mode and taking longer to execute, added wait step in such scenario,
---
 gpMgmt/test/behave/mgmt_utils/gpmovemirrors.feature | 1 +
 gpMgmt/test/behave/mgmt_utils/gprecoverseg.feature  | 6 ++++++
 gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py   | 2 +-
 gpMgmt/test/behave_utils/utils.py                   | 2 +-
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/gpMgmt/test/behave/mgmt_utils/gpmovemirrors.feature b/gpMgmt/test/behave/mgmt_utils/gpmovemirrors.feature
index 1333e54c0f..ed6dda775f 100644
--- a/gpMgmt/test/behave/mgmt_utils/gpmovemirrors.feature
+++ b/gpMgmt/test/behave/mgmt_utils/gpmovemirrors.feature
@@ -146,6 +146,7 @@ Feature: Tests for gpmovemirrors
         | run gprecoverseg          | some         | 0                  | 1,2            | running in place full recovery for all failed contents |
         | run gprecoverseg          | all          | None               | 0,1,2          | running in place full recovery for all failed contents |
 
+    @skip_cleanup
     Scenario: gpmovemirrors can move mirrors even if start fails for some mirrors
         Given the database is running
         And all the segments are running
diff --git a/gpMgmt/test/behave/mgmt_utils/gprecoverseg.feature b/gpMgmt/test/behave/mgmt_utils/gprecoverseg.feature
index 55fd42d070..3d28dfc11d 100644
--- a/gpMgmt/test/behave/mgmt_utils/gprecoverseg.feature
+++ b/gpMgmt/test/behave/mgmt_utils/gprecoverseg.feature
@@ -525,6 +525,7 @@ Feature: gprecoverseg tests
     And sql "DROP TABLE IF EXISTS test_recoverseg; CREATE TABLE test_recoverseg AS SELECT generate_series(1,100000000) AS a;" is executed in "postgres" db
     When the user asynchronously runs "gprecoverseg -a" and the process is saved
     Then the user waits until recovery_progress.file is created in gpAdminLogs and verifies its format
+    And an FTS probe is triggered
     And the user waits until saved async process is completed
     And recovery_progress.file should not exist in gpAdminLogs
     And the user waits until mirror on content 0,1,2 is up
@@ -543,7 +544,9 @@ Feature: gprecoverseg tests
     And all files in gpAdminLogs directory are deleted on all hosts in the cluster
     Then the gprecoverseg lock directory is removed
 
+    And the cluster is rebalanced
     And user immediately stops all primary processes for content 0,1,2
+    And the user waits until mirror on content 0,1,2 is down
     And user can start transactions
     When the user asynchronously runs "gprecoverseg -aF" and the process is saved
     And the user suspend the walsender on the primary on content 0
@@ -553,6 +556,7 @@ Feature: gprecoverseg tests
     And the user reset the walsender on the primary on content 0
     And the user waits until saved async process is completed
     And recovery_progress.file should not exist in gpAdminLogs
+    And an FTS probe is triggered
     And the user waits until mirror on content 0,1,2 is up
     And user can start transactions
 
@@ -673,6 +677,8 @@ Feature: gprecoverseg tests
     And edit the input file to recover mirror with content 2 incremental
     When the user asynchronously runs gprecoverseg with input file and additional args "-a" and the process is saved
     Then the user waits until recovery_progress.file is created in gpAdminLogs and verifies its format
+    And user waits until gp_stat_replication table has no pg_basebackup entries for content 1
+    And an FTS probe is triggered
     And the user waits until mirror on content 1,2 is up
     And verify that mirror on content 0 is down
     And user can start transactions
diff --git a/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py b/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py
index 7b112ef29c..5d7d89b0f3 100644
--- a/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py
+++ b/gpMgmt/test/behave/mgmt_utils/steps/mgmt_utils.py
@@ -461,7 +461,7 @@ def impl(context, logdir):
 @then('the user waits until recovery_progress.file is created in {logdir} and verifies its format')
 def impl(context, logdir):
     attempt = 0
-    num_retries = 60000
+    num_retries = 6000
     log_dir = _get_gpAdminLogs_directory() if logdir == 'gpAdminLogs' else logdir
     recovery_progress_file = '{}/recovery_progress.file'.format(log_dir)
     while attempt < num_retries:
diff --git a/gpMgmt/test/behave_utils/utils.py b/gpMgmt/test/behave_utils/utils.py
index 8a05d2808f..e23629f7da 100644
--- a/gpMgmt/test/behave_utils/utils.py
+++ b/gpMgmt/test/behave_utils/utils.py
@@ -808,7 +808,7 @@ def wait_for_desired_query_result(dburl, query, desired_result, utility=False):
     Raises an Exception after failing <num_retries> times.
     """
     attempt = 0
-    num_retries = 150
+    num_retries = 600
     actual_result = None
     while (attempt < num_retries) and (actual_result != desired_result):
         attempt += 1


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cloudberry.apache.org
For additional commands, e-mail: commits-help@cloudberry.apache.org