Skip to content

Testsuite: Make testing with wrapped / direct buffers more random#15281

Merged
chrisvest merged 1 commit into4.2from
testsuite_random
May 28, 2025
Merged

Testsuite: Make testing with wrapped / direct buffers more random#15281
chrisvest merged 1 commit into4.2from
testsuite_random

Conversation

@normanmaurer
Copy link
Copy Markdown
Member

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 May 28, 2025 15:10
@normanmaurer normanmaurer added this to the 4.2.2.Final milestone May 28, 2025
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
@chrisvest chrisvest merged commit 62117d1 into 4.2 May 28, 2025
14 of 15 checks passed
@chrisvest chrisvest deleted the testsuite_random branch May 28, 2025 17:59
normanmaurer added a commit that referenced this pull request Jun 23, 2025
…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
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