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

infoschema: improve test stability in other timezones #20704

Merged
merged 3 commits into from Nov 3, 2020
Merged

infoschema: improve test stability in other timezones #20704

merged 3 commits into from Nov 3, 2020

Conversation

ghost
Copy link

@ghost ghost commented Oct 28, 2020

What problem does this PR solve?

This improves stability of information_schema tests when run in Timezones outside of China.

Problem Summary:

The type of cluster_slow_query.Time is a timestamp, which has the semantics of converting from the current timestamp to UTC before comparing to the value in storage. The test-suite previously did not explicitly set the timestamp, which lead to an ambiguous comparision:

		tk.MustQuery("select time from `CLUSTER_SLOW_QUERY` where time='2019-02-12 19:33:56.571953'").Check(testutil.RowsWithSep("|", "2019-02-12 19:33:56.571953"))

I have seen this fail inconsistently (i.e. it's only flaky: not a failing test). I think the reason might be because the test-suite runs in parallel. See TestSlowQuery() which sets the timezone for consistency, but TestSelectClusterTable() does not.

This instability was introduced in #19938

What is changed and how it works?

What's Changed:

Improvements to test stability.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • Unit test

Side effects

  • None

Release note

  • No release note

@ghost
Copy link
Author

ghost commented Oct 28, 2020

/run-all-tests

Copy link
Member

@wjhuang2016 wjhuang2016 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added the status/LGT1 Indicates that a PR has LGTM 1. label Nov 3, 2020
@bb7133
Copy link
Member

bb7133 commented Nov 3, 2020

LGTM

@ti-srebot ti-srebot removed the status/LGT1 Indicates that a PR has LGTM 1. label Nov 3, 2020
@ti-srebot ti-srebot added the status/LGT2 Indicates that a PR has LGTM 2. label Nov 3, 2020
@bb7133
Copy link
Member

bb7133 commented Nov 3, 2020

/merge

@ti-srebot ti-srebot added the status/can-merge Indicates a PR has been approved by a committer. label Nov 3, 2020
@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@nullnotnil merge failed.

@wjhuang2016
Copy link
Member

/run-integration-compatibility-test

@wjhuang2016
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor

Your auto merge job has been accepted, waiting for:

  • 20781

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@nullnotnil merge failed.

Copy link
Contributor

@AilinKid AilinKid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ti-srebot ti-srebot added status/LGT3 The PR has already had 3 LGTM. and removed status/LGT2 Indicates that a PR has LGTM 2. labels Nov 3, 2020
@wjhuang2016
Copy link
Member

/run-check_dev_2

@wjhuang2016
Copy link
Member

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot ti-srebot merged commit 4e58f32 into pingcap:master Nov 3, 2020
@ghost ghost deleted the fix-infoschema-test branch November 3, 2020 14:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/infoschema sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT3 The PR has already had 3 LGTM.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants