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

test: fix flakey TestParseTimestamp #666

Merged
merged 1 commit into from
Jun 30, 2017
Merged

test: fix flakey TestParseTimestamp #666

merged 1 commit into from
Jun 30, 2017

Conversation

choleraehyq
Copy link
Contributor

t and nt represent the same time instant, yet are not deep equal. nt don't have monotonic clock imformation.

Fix #665

@siddontang PTAL

Signed-off-by: Cholerae Hu huyingqian@pingcap.com

Signed-off-by: Cholerae Hu <huyingqian@pingcap.com>
Copy link
Contributor

@nolouch nolouch left a comment

Choose a reason for hiding this comment

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

LGTM

@@ -52,7 +52,7 @@ func (s *testUtilSuite) TestParseTimestap(c *C) {
data := uint64ToBytes(uint64(t.UnixNano()))
nt, err := parseTimestamp(data)
c.Assert(err, IsNil)
c.Assert(nt, Equals, t)
c.Assert(nt.Equal(t), IsTrue)
Copy link
Contributor

Choose a reason for hiding this comment

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

The function Equal is in go 1.8?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes. No API changes.

@siddontang
Copy link
Contributor

LGTM

@siddontang siddontang merged commit 07e02db into master Jun 30, 2017
@siddontang siddontang deleted the hyq/fix#665 branch June 30, 2017 07:17
@sre-bot sre-bot added the contribution Indicates that the PR was contributed by an external member. label Dec 18, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution Indicates that the PR was contributed by an external member.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

test: TestParseTimestamp will fail on go1.9+
4 participants