Skip to content

Testsuite: Make testing with wrapped / direct buffers more random (#1…#15395

Merged
normanmaurer merged 1 commit into4.1from
random
Jun 24, 2025
Merged

Testsuite: Make testing with wrapped / direct buffers more random (#1…#15395
normanmaurer merged 1 commit into4.1from
random

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

…5281)

Motivation:

In our testsuite we often just wrapped a byte[] and passed it to the write method. While this works it also might end up not testing often with direct buffers. We should make this a bit more random and so cover direct and heap buffers. The idea popped up when reviewing #15231

Modifications:

  • Add new static helper method that will either return a wrapped buffer or a direct buffers in a random fashion
  • Use this method to allocate buffers

Result:

More random testing of heap / direct buffers

…5281)

Motivation:

In our testsuite we often just wrapped a byte[] and passed it to the
write method. While this works it also might end up not testing often
with direct buffers. We should make this a bit more random and so cover
direct and heap buffers. The idea popped up when reviewing
#15231

Modifications:

- Add new static helper method that will either return a wrapped buffer
or a direct buffers in a random fashion
- Use this method to allocate buffers

Result:

More random testing of heap / direct buffers
@normanmaurer normanmaurer requested a review from chrisvest June 23, 2025 22:06
@normanmaurer normanmaurer added this to the 4.1.123.Final milestone Jun 23, 2025
@normanmaurer
Copy link
Copy Markdown
Member Author

Just a port of what we did in 4.2 to make cherry-picking easier

@normanmaurer normanmaurer merged commit 171b33d into 4.1 Jun 24, 2025
15 of 16 checks passed
@normanmaurer normanmaurer deleted the random branch June 24, 2025 00:25
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.

2 participants