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

[Bug] Unstable unit test: UnitAllTest.testCleanBuffer #7592

Closed
3 tasks done
yp969803 opened this issue Nov 28, 2023 · 0 comments · Fixed by #7593
Closed
3 tasks done

[Bug] Unstable unit test: UnitAllTest.testCleanBuffer #7592

yp969803 opened this issue Nov 28, 2023 · 0 comments · Fixed by #7593

Comments

@yp969803
Copy link
Contributor

Before Creating the Bug Report

  • I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

Ubuntu 20.04

RocketMQ version

develop

JDK Version

No response

Describe the Bug

java.lang.reflect.InvocationTargetException
	at org.apache.rocketmq.common.UtilAllTest.testCleanBuffer(UtilAllTest.java:218)
Caused by: java.lang.IllegalArgumentException: buffer is non-direct
	at org.apache.rocketmq.common.UtilAllTest.testCleanBuffer(UtilAllTest.java:218)

Steps to Reproduce

By running

mvn test

What Did You Expect to See?

Test should pass

What Did You See Instead?

[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.19.1:test (default-test) on project rocketmq-common: There are test failures.

Additional Context

No response

yp969803 added a commit to yp969803/rocketmq that referenced this issue Nov 28, 2023
lizhanhui added a commit that referenced this issue Nov 29, 2023
#7593)

* [ISSUE #7592] testCleanBuffer unit test modifies, changed non-direct to direct buffer allocation

* fix: consolidate UtilAll#cleanBuffer by checking if the given buffer is direct or not

Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>

---------

Signed-off-by: Li Zhanhui <lizhanhui@gmail.com>
Co-authored-by: Li Zhanhui <lizhanhui@gmail.com>
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 a pull request may close this issue.

1 participant