Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some tests can't pass when time_zone not equal to Asia/Shanghai #49493

Closed
9 of 19 tasks
Defined2014 opened this issue Dec 15, 2023 · 3 comments · Fixed by #49588
Closed
9 of 19 tasks

Some tests can't pass when time_zone not equal to Asia/Shanghai #49493

Defined2014 opened this issue Dec 15, 2023 · 3 comments · Fixed by #49588
Assignees
Labels

Comments

@Defined2014
Copy link
Contributor

Defined2014 commented Dec 15, 2023

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

Some tests and feature can't pass when time_zone != Asia/Shanghait, we should fix it.

You could get list of test cases below

  • TestStmtFile
  • TestFlashbackCloseAndResetPDSchedule
  • TestTiDBTrx
  • TestExactStalenessTransaction
  • TestSetTransactionReadOnlyAsOf
  • TestCancelFlashbackCluster
  • TestSetTiDBCloudStorageURI
  • TestIssue20236
  • TestClusterTableSlowQuery
  • TestGetLock
  • TestSelectClusterTable
  • TestTiFlashFlashbackCluster
  • TestGlobalVariablesOnFlashback
  • TestStmtFiles
  • TestChangingColOriginDefaultValueAfterAddColAndCastSucc
  • TestAddDDLDuringFlashback
  • TestStmtFileInvalidLine
  • TestGetTimeZone
  • TestRecoverClusterMeetError

log.txt

2. What did you expect to see? (Required)

The test shouldn't related with time_zone.

3. What did you see instead (Required)

The test failed.

4. What is your TiDB version? (Required)

@Defined2014 Defined2014 self-assigned this Dec 15, 2023
@Defined2014 Defined2014 added the sig/sql-infra SIG: SQL Infra label Dec 15, 2023
@Defined2014
Copy link
Contributor Author

Defined2014 commented Dec 15, 2023

A same problem #42755

@hawkingrei
Copy link
Member

hawkingrei commented Dec 18, 2023

Can we use the bazel as our default ut tool? bazel has managed the unit test environment in the tidb repo.

tidb/.bazelrc

Line 21 in f50e894

test --test_env=TZ=Asia/Shanghai

@Defined2014
Copy link
Contributor Author

Can we use the bazel as our default ut tool? bazel has managed the unit test environment in the tidb repo.

tidb/.bazelrc

Line 21 in f50e894

test --test_env=TZ=Asia/Shanghai

But the problem is not only about test itself. We did not handle time_zone correctly in some features. Every test cases should pass in any time_zone.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants