GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix test · netty/netty@eb39435

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • buffer/src/test/java/io/netty/buffer
    • SizeClassedChunkCacheTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎buffer/src/test/java/io/netty/buffer/SizeClassedChunkCacheTest.java‎

Copy file name to clipboardExpand all lines: buffer/src/test/java/io/netty/buffer/SizeClassedChunkCacheTest.java
+3-7Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -352,20 +352,16 @@ void cacheSettlesAtRetentionFloorAfterBurstThreadLocal() {
352352
void cacheSettlesAfterBurstShared() {
353353
SizeClassedChunkCache cache = SizeClassedChunkCache.create(false);
354354

355-
int crq = AdaptivePoolingAllocator.CHUNK_REUSE_QUEUE;
356-
int capacity = Math.max(16, crq * 2);
357-
// Keep total offered within SHARED_CACHE_CAPACITY to avoid silent drops on bounded MPMC queue
358-
int excess = Math.min(10, capacity - crq);
359-
assertTrue(excess > 0, "excess must be positive for the test to be meaningful");
355+
int excess = 10;
360356
SizeClassedChunk workingSet = chunkWithCapacity();
361357
cache.offerChunk(workingSet);
362-
for (int i = 0; i < crq - 1; i++) {
358+
for (int i = 0; i < AdaptivePoolingAllocator.CHUNK_REUSE_QUEUE - 1; i++) {
363359
cache.offerChunk(chunkWithoutCapacity());
364360
}
365361
SizeClassedChunk[] excessChunks = new SizeClassedChunk[excess];
366362
for (int i = 0; i < excess; i++) {
367363
excessChunks[i] = fullChunk();
368-
assertTrue(cache.offerChunk(excessChunks[i]), "all excess chunks must be accepted by the queue");
364+
cache.offerChunk(excessChunks[i]);
369365
}
370366

371367
int maxCycles = (AdaptivePoolingAllocator.CHUNK_PURGE_THRESHOLD + 1) * 3;

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.