Class ListenerStarvationTest

java.lang.Object
org.semispace.ListenerStarvationTest

@TestInstance(PER_CLASS) public class ListenerStarvationTest extends Object
Starvation test. Thanks to Chris Mcfarlen of Yahoo for providing the scenario and the initial test code.

This test will fail with a large iteration number for reasons not pinpointed at the time of writing.

  • Constructor Details

    • ListenerStarvationTest

      public ListenerStarvationTest()
  • Method Details

    • setUp

      @BeforeAll protected void setUp() throws Exception
      Throws:
      Exception
    • testStarvation

      @Test public void testStarvation()
      When having several listeners and a combination of read and take, it possible for listeners to get starved when competing for resource. In this test, this happens after 40 missed reads for a given reader.