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

yiguolei pushed a commit to branch branch-4.1
in repository https://gitbox.apache.org/repos/asf/doris.git


The following commit(s) were added to refs/heads/branch-4.1 by this push:
     new 7c105006f1d [fix](regression) Restore time zone after test_tz_load 
(#65385)
7c105006f1d is described below

commit 7c105006f1d8fa017278e7e920f58354f802319d
Author: shuke <[email protected]>
AuthorDate: Fri Jul 10 09:35:07 2026 +0800

    [fix](regression) Restore time zone after test_tz_load (#65385)
    
    ## Summary
    - restore the original global time_zone after test_tz_load changes it
    during the suite
    - clean up the temporary global_timezone_test table in the finally block
    - prevent later nonConcurrent suites from inheriting UTC global time
    zone
    
    ## Testing
    - [x] Verified @@global.time_zone and @@time_zone are Asia/Shanghai
    after the runs
    - [ ] Buildall skipped per request
---
 .../suites/datatype_p0/datetimev2/test_tz_load.groovy            | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/regression-test/suites/datatype_p0/datetimev2/test_tz_load.groovy 
b/regression-test/suites/datatype_p0/datetimev2/test_tz_load.groovy
index 49ec18b6541..8a00dae736f 100644
--- a/regression-test/suites/datatype_p0/datetimev2/test_tz_load.groovy
+++ b/regression-test/suites/datatype_p0/datetimev2/test_tz_load.groovy
@@ -22,6 +22,9 @@ suite("test_tz_load", "nonConcurrent") {
     def s3Region = getS3Region()
     def ak = getS3AK()
     def sk = getS3SK()
+    def originGlobalTimeZone = sql("select @@global.time_zone")[0][0]
+
+    try {
     
     sql "drop table if exists ${table1}"
 
@@ -226,4 +229,8 @@ suite("test_tz_load", "nonConcurrent") {
     }
     sql "sync"
     qt_global_offset "select * from ${table1} order by id"
-}
\ No newline at end of file
+    } finally {
+        sql "SET GLOBAL time_zone = '${originGlobalTimeZone}'"
+        try_sql("drop table if exists ${table1}")
+    }
+}


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

Reply via email to