Skip to content

Fix test bytes to long - #74

Merged
zhaohong merged 5 commits into
tronprotocol:developfrom
seanrobbins:fixTestBytesToLong
Jan 20, 2018
Merged

zhaohong merged 5 commits into
tronprotocol:developfrom
seanrobbins:fixTestBytesToLong

Conversation

@seanrobbins

Copy link
Copy Markdown
Contributor

What does this PR do?

  1. Calls buffer.clear() before writing to the ByteBuffer in TypeConversion
  2. Adds assertions into the TypeConversionTest

Why are these changes required?
This test was failing in build runs from Gradle:

org.tron.common.utils.TypeConversionTest > testBytesToLong FAILED
java.nio.BufferOverflowException at TypeConversionTest.java:39

Was not failing when the same test is run in IntelliJ, but as it was being caused by the buffer containing bytes from a previous use of the TypeConversion class, may have also become an issue for the running application in the future.

This PR has been tested by:

  • Unit Tests

@zhaohong
zhaohong merged commit 0da8848 into tronprotocol:develop Jan 20, 2018
@zhaohong

Copy link
Copy Markdown
Contributor

thanks!

@seanrobbins
seanrobbins deleted the fixTestBytesToLong branch January 21, 2018 12:01
zhaohong added a commit that referenced this pull request Feb 5, 2018
 qOsK6lO1HJRG31mdFs2I+4omtgxTd+fN029uoYYqsfL/jZv1mxccm+8fv7pDo9R6
 L2r3JNd6HStm/J9PgJDNYZ5OtLzss0tKfdKi9k5g5dADOgO4D9jgFpbfWHCB+Fh3
 XFKAjDe1xjqwO329o8Up08MTkaqRijCgOEBurdEiD0/I1LKA8owi4SNftyTJsjrO
 l4q9Zkkocc+aIXfNYMpJmS/nl60fHWuEK6oyGjo4eWcJWt8FYyp7vYHIqtYDQSlg
 fLf4eZQWzIqfp2qxP6yB6s0ZsZPWv2wqYETto/Ur1485EObXuDkmZ0ZxIe2htmg=
 =kFUz
 -----END PGP SIGNATURE-----
 

Merge pull request #74 from seanrobbins/fixTestBytesToLong

Fix test bytes to long
@ybhgenius

Copy link
Copy Markdown
Contributor

Hello, I am a crew member of TRON, and now we are planning to provide an incentive for your contribution. Please leave me your email address. Thanks.

@seanrobbins

Copy link
Copy Markdown
Contributor Author

Hello, that sounds very interesting. You can contact me using sean.m.robbins at gmail.com

huzhenyuan pushed a commit that referenced this pull request Jul 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants