github-actions[bot] commented on code in PR #64795:
URL: https://github.com/apache/doris/pull/64795#discussion_r3490539649
##########
fe/fe-core/src/test/java/org/apache/doris/catalog/DynamicPartitionTableTest.java:
##########
@@ -2014,4 +2016,201 @@ public void testAutoBuckets() throws Exception {
// due to partition size eq 0, use previous partition's(54th) bucket
num
Assert.assertEquals(53, partitions.get(partitions.size() -
1).getDistributionInfo().getBucketNum());
}
+
+ @Test
+ public void testTimeStampTzDynamicPartition() throws Exception {
+ // Set session timezone to something different from the partition
timezone
+ // to verify scheduler does not incorrectly use session timezone via
ConnectContext fallback.
+ connectContext.getSessionVariable().setTimeZone("Asia/Shanghai");
Review Comment:
These tests change the shared static `connectContext` timezone but never
restore it. `DynamicPartitionTableTest` reuses that same context for the whole
class, and JUnit does not guarantee method order, so a later test can inherit
`Asia/Shanghai`, `Europe/London`, or `America/Chicago` instead of the default
session timezone and become order-dependent. Please save the original timezone
and restore it in a `finally` block in each new test that changes it, like the
new `CreateTableLikeTest` / `PartitionExprUtilTest` cases already do.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]