Skip to content

test: check that FileStores gets an aligned slice instead of its size, which depends on where malloc puts the buffer - #103

Merged
Project516 merged 1 commit into
nextfrom
p516/filestores-align
Nov 23, 2026
Merged

Project516 merged 1 commit into
nextfrom
p516/filestores-align

Conversation

@Project516

Copy link
Copy Markdown
Owner

What this changes

FileStores printed the capacity of ByteBuffer.allocateDirect(2 * block).alignedSlice(block). That capacity is one or two blocks depending on whether the buffer's address happens to be block-aligned, which for HotSpot depends on where malloc puts it, so the expected output changes from run to run. The program now prints whether the slice is block-aligned and a whole number of blocks, which holds on both.

Tests

  • FileStores on HotSpot three times and on java-web: identical output, aligned slice true.

…, which depends on where malloc puts the buffer
@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: d9a90fa8-b153-477b-8027-58a4fadf7fa0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@project516-review-bot project516-review-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The test now verifies that the aligned slice is block-aligned, has at least one block of capacity, and its capacity is a whole multiple of the block size. This replaces a flaky assertion that printed the raw capacity, which varied between one or two blocks depending on the malloc address.


review-bot, model nvidia/nemotron-3-ultra-550b-a55b:free, verdict approve

@Project516
Project516 merged commit f1d354a into next Nov 23, 2026
5 checks passed
@Project516
Project516 deleted the p516/filestores-align branch November 23, 2026 14:36
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.

1 participant