Class BufferPoolTest

java.lang.Object
org.apache.kafka.clients.producer.internals.BufferPoolTest

public class BufferPoolTest extends Object
  • Constructor Details

    • BufferPoolTest

      public BufferPoolTest()
  • Method Details

    • teardown

      @AfterEach public void teardown()
    • testSimple

      @Test public void testSimple() throws Exception
      Test the simple non-blocking allocation paths
      Throws:
      Exception
    • testCantAllocateMoreMemoryThanWeHave

      @Test public void testCantAllocateMoreMemoryThanWeHave() throws Exception
      Test that we cannot try to allocate more memory than we have in the whole pool
      Throws:
      Exception
    • testDelayedAllocation

      @Test public void testDelayedAllocation() throws Exception
      Test that delayed allocation blocks
      Throws:
      Exception
    • testBufferExhaustedExceptionIsThrown

      @Test public void testBufferExhaustedExceptionIsThrown() throws Exception
      Test if BufferExhausted exception is thrown when there is not enough memory to allocate and the elapsed time is greater than the max specified block time.
      Throws:
      Exception
    • testBlockTimeout

      @Test public void testBlockTimeout() throws Exception
      Verify that a failed allocation attempt due to not enough memory finishes soon after the maxBlockTimeMs.
      Throws:
      Exception
    • testCleanupMemoryAvailabilityWaiterOnBlockTimeout

      @Test public void testCleanupMemoryAvailabilityWaiterOnBlockTimeout() throws Exception
      Test if the waiter that is waiting on availability of more memory is cleaned up when a timeout occurs
      Throws:
      Exception
    • testCleanupMemoryAvailabilityWaiterOnInterruption

      @Test public void testCleanupMemoryAvailabilityWaiterOnInterruption() throws Exception
      Test if the waiter that is waiting on availability of more memory is cleaned up when an interruption occurs
      Throws:
      Exception
    • testCleanupMemoryAvailabilityOnMetricsException

      @Test public void testCleanupMemoryAvailabilityOnMetricsException() throws Exception
      Throws:
      Exception
    • testStressfulSituation

      @Test public void testStressfulSituation() throws Exception
      This test creates lots of threads that hammer on the pool
      Throws:
      Exception
    • testLargeAvailableMemory

      @Test public void testLargeAvailableMemory() throws Exception
      Throws:
      Exception
    • outOfMemoryOnAllocation

      @Test public void outOfMemoryOnAllocation()
    • testCloseAllocations

      @Test public void testCloseAllocations() throws Exception
      Throws:
      Exception
    • testCloseNotifyWaiters

      @Test public void testCloseNotifyWaiters() throws Exception
      Throws:
      Exception