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

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

commit f7b10c1bf4cafed68019278a5c00dc906d50f7da
Author: Alexandra Wang <[email protected]>
AuthorDate: Tue Dec 6 16:11:55 2022 -0800

    Support "Mq" in isolation test framework
    
    Previously, in commit 32b8646, we added "M" flag to support utility
    mode connection to a segment who is configured as mirror in FTS
    configuration but is actually running like a primary. We now also add
    "Mq" flag to support quitting from this connection. We will make use
    of it in the next commit.
---
 src/test/isolation2/sql_isolation_testcase.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/test/isolation2/sql_isolation_testcase.py 
b/src/test/isolation2/sql_isolation_testcase.py
index f7b507c93b..07b5292ab2 100644
--- a/src/test/isolation2/sql_isolation_testcase.py
+++ b/src/test/isolation2/sql_isolation_testcase.py
@@ -786,6 +786,10 @@ class SQLIsolationExecutor(object):
                     pass
         elif flag == "M":
             self.get_process(output_file, process_name, con_mode, 
dbname=dbname).query(sql.strip(), post_run_cmd, global_sh_executor)
+        elif flag == "Mq":
+            if len(sql) > 0:
+                raise Exception("No query should be given on quit Mq")
+            self.quit_process(output_file, process_name, con_mode, 
dbname=dbname)
         else:
             raise Exception("Invalid isolation flag")
 
@@ -812,7 +816,7 @@ class SQLIsolationExecutor(object):
                 if command_part == "" or command_part == "\n":
                     print(file=output_file)
                     newline = True
-                elif re.match(r".*;\s*$", command_part) or 
re.match(r"^\d+[q\\<]:\s*$", line) or re.match(r"^\*Rq:$", line) or 
re.match(r"^-?\d+[SUR][q\\<]:\s*$", line):
+                elif re.match(r".*;\s*$", command_part) or 
re.match(r"^\d+[q\\<]:\s*$", line) or re.match(r"^\*Rq:$", line) or 
re.match(r"^-?\d+[SUMR][q\\<]:\s*$", line):
                     command += command_part
                     try:
                         self.process_command(command, output_file, 
shell_executor)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to