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

*: Add few error checks in tests, clean error messages and fix one misspell #8101

Merged
merged 42 commits into from
Oct 31, 2018
Merged

Conversation

dvrkps
Copy link
Contributor

@dvrkps dvrkps commented Oct 29, 2018

No description provided.

@sre-bot
Copy link
Contributor

sre-bot commented Oct 29, 2018

Hi contributor, thanks for your PR.

This patch needs to be approved by someone of admins. They should reply with "/ok-to-test" to accept this PR for running test automatically.

@shenli shenli added the contribution This PR is from a community contributor. label Oct 30, 2018
@shenli
Copy link
Member

shenli commented Oct 30, 2018

@dvrkps Thanks!
Please make sure you could pass make dev.

@@ -588,6 +588,7 @@ func (s *testStateChangeSuite) TestShowIndex(c *C) {
result, err = s.execQuery(tk, "show index from tr;")
c.Assert(err, IsNil)
err = checkResult(result, testkit.Rows("tr 1 idx1 1 purchased A 0 <nil> <nil> BTREE ", "t 1 c2 1 c2 A 0 <nil> <nil> YES BTREE "))
Copy link
Contributor

Choose a reason for hiding this comment

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

the test was wrong.

err = checkResult(result, testkit.Rows("tr 1 idx1 1 purchased A 0 <nil> <nil> YES BTREE  "))

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@crazycs520 Done. Thx.

@@ -72,8 +72,8 @@ func (s *testEncryptSuite) TestSQLEncode(c *C) {

for _, t := range tests {
crypted, err := SQLDecode(t.str, t.passwd)
c.Assert(err, NotNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

c.Assert(err, IsNil)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@crazycs520 Done. Thx.

@@ -3127,6 +3127,7 @@ func (s *testIntegrationSuite) TestDateBuiltin(c *C) {

tk.MustExec("set sql_mode = 'NO_ZERO_DATE'")
rs, err := tk.Exec("select date '0000-00-00';")
c.Assert(err, NotNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

c.Assert(err, IsNil)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@crazycs520 Done. Thx.

@@ -3156,6 +3157,7 @@ func (s *testIntegrationSuite) TestDateBuiltin(c *C) {
c.Assert(rs.Close(), IsNil)

rs, err = tk.Exec("select date '0000-00-00';")
c.Assert(err, NotNil)
Copy link
Contributor

Choose a reason for hiding this comment

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

c.Assert(err, IsNil)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@crazycs520 Done. Thx.

@gregwebs
Copy link
Contributor

@dvrkps thank you! Lets see if we can get some of these added to the linting/ci now.

Copy link
Member

@zz-jason zz-jason left a comment

Choose a reason for hiding this comment

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

LGTM

@zz-jason zz-jason added component/test status/LGT1 Indicates that a PR has LGTM 1. type/enhancement The issue or PR belongs to an enhancement. labels Oct 31, 2018
@zz-jason zz-jason changed the title Add few error checks in tests, clean error messages and fix one misspell *: Add few error checks in tests, clean error messages and fix one misspell Oct 31, 2018
@zz-jason
Copy link
Member

@XuHuaiyu @winoros PTAL

Copy link
Member

@ngaut ngaut left a comment

Choose a reason for hiding this comment

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

LGTM

@ngaut ngaut merged commit 9ec7515 into pingcap:master Oct 31, 2018
@gregwebs
Copy link
Contributor

@crazycs520 Can we turn on any new linters in the Makefile now?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/test contribution This PR is from a community contributor. status/LGT1 Indicates that a PR has LGTM 1. type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants