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

ddl: stabilize test TestIndexChange #18228

Merged
merged 5 commits into from
Aug 3, 2020

Conversation

wjhuang2016
Copy link
Member

@wjhuang2016 wjhuang2016 commented Jun 28, 2020

Signed-off-by: wjhuang2016 huangwenjun1997@gmail.com

What problem does this PR solve?

Issue Number: close #15531

[2020-06-30T07:13:16.416Z] ----------------------------------------------------------------------

[2020-06-30T07:13:16.416Z] FAIL: index_change_test.go:54: testIndexChangeSuite.TestIndexChange

[2020-06-30T07:13:16.416Z] 

[2020-06-30T07:13:16.416Z] index_change_test.go:174:

[2020-06-30T07:13:16.416Z]     c.Check(errors.ErrorStack(checkErr), Equals, "")

[2020-06-30T07:13:16.416Z] ... obtained string = "" +

[2020-06-30T07:13:16.416Z] ...     "index should have been dropped\n" +

[2020-06-30T07:13:16.416Z] ...     "github.com/pingcap/tidb/ddl.(*testIndexChangeSuite).TestIndexChange.func2\n" +

[2020-06-30T07:13:16.416Z] ...     "\t/home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/ddl/index_change_test.go:169\n" +

[2020-06-30T07:13:16.416Z] ...     "github.com/pingcap/tidb/ddl.(*TestDDLCallback).OnJobUpdated\n" +

[2020-06-30T07:13:16.416Z] ...     "\t/home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/ddl/callback_test.go:72\n" +

[2020-06-30T07:13:16.416Z] ...     "github.com/pingcap/tidb/ddl.(*worker).handleDDLJobQueue\n" +

[2020-06-30T07:13:16.416Z] ...     "\t/home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/ddl/ddl_worker.go:511\n" +

[2020-06-30T07:13:16.416Z] ...     "github.com/pingcap/tidb/ddl.(*worker).start\n" +

[2020-06-30T07:13:16.416Z] ...     "\t/home/jenkins/agent/workspace/tidb_ghpr_unit_test/go/src/github.com/pingcap/tidb/ddl/ddl_worker.go:155\n" +

[2020-06-30T07:13:16.416Z] ...     "runtime.goexit\n" +

[2020-06-30T07:13:16.416Z] ...     "\t/usr/local/go/src/runtime/asm_amd64.s:1357"

[2020-06-30T07:13:16.416Z] ... expected string = ""

[2020-06-30T07:13:16.416Z] 

[2020-06-30T07:13:16.416Z] PASS: column_change_test.go:61: testColumnChangeSuite.TestColumnChange	0.971s

Problem Summary:

testCreateIndex may not finish. If we set prevState = model.StateNone, then in the first onJobUpdated, it may change prevState to StatePublic.

What is changed and how it works?

Wait for the first onJobUpdated finish.

Related changes

  • Need to cherry-pick to the release branch

Check List

Tests

  • No code

Side effects

Release note

  • No release note

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
@github-actions github-actions bot added the sig/sql-infra SIG: SQL Infra label Jun 28, 2020
@zimulala zimulala modified the milestones: 持续性啧啧啧 p]`\-099lkkiuyyyyytq11122234yzg, pools Jun 30, 2020
Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

Could you add the information that this test failed to PR description? I see there is only connections in the issue, but connections failed to open.

@wjhuang2016
Copy link
Member Author

Could you add the information that this test failed to PR description? I see there is only connections in the issue, but connections failed to open.

DONE

@codecov
Copy link

codecov bot commented Jul 9, 2020

Codecov Report

Merging #18228 into master will not change coverage.
The diff coverage is n/a.

@@             Coverage Diff             @@
##             master     #18228   +/-   ##
===========================================
  Coverage   79.6502%   79.6502%           
===========================================
  Files           549        549           
  Lines        150508     150508           
===========================================
  Hits         119880     119880           
  Misses        21099      21099           
  Partials       9529       9529           

Copy link
Contributor

@zimulala zimulala left a comment

Choose a reason for hiding this comment

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

testCreateIndex may not finish.

This job is in the history job queue(see checkHistoryJobArgs), then this operation should have been processed.

Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
Copy link
Contributor

@zimulala zimulala 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 Jul 24, 2020
bb7133
bb7133 previously approved these changes Jul 24, 2020
Copy link
Member

@bb7133 bb7133 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/LGT2 Indicates that a PR has LGTM 2. and removed status/LGT1 Indicates that a PR has LGTM 1. labels Jul 24, 2020
ti-srebot
ti-srebot previously approved these changes Jul 24, 2020
Signed-off-by: wjhuang2016 <huangwenjun1997@gmail.com>
@bb7133
Copy link
Member

bb7133 commented Aug 3, 2020

/merge

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

/run-all-tests

@ti-srebot
Copy link
Contributor

@wjhuang2016 merge failed.

@bb7133
Copy link
Member

bb7133 commented Aug 3, 2020

/run-common-test

@bb7133
Copy link
Member

bb7133 commented Aug 3, 2020

/run-unit-test

@bb7133
Copy link
Member

bb7133 commented Aug 3, 2020

/merge

@ti-srebot
Copy link
Contributor

/run-all-tests

@ti-srebot
Copy link
Contributor

@wjhuang2016 merge failed.

@bb7133
Copy link
Member

bb7133 commented Aug 3, 2020

/run-unit-test

@bb7133 bb7133 merged commit 80aa5f9 into pingcap:master Aug 3, 2020
@wjhuang2016 wjhuang2016 deleted the Fix_TestIndexChange branch November 17, 2022 11:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test sig/sql-infra SIG: SQL Infra status/can-merge Indicates a PR has been approved by a committer. status/LGT2 Indicates that a PR has LGTM 2.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

index_change_test.go:testIndexChangeSuite.TestIndexChange failed
4 participants