    1   package org.codehaus.activemq.ra;
    2
    3   import junit.framework.TestCase;
    4   import EDU.oswego.cs.dl.util.concurrent.SynchronizedBoolean;
    5
    6   /***
    7    */
    8   public class CircularQueueTest extends TestCase {
    9
    10
    11
    12      public void testStoppping() throws Exception {
    13          SynchronizedBoolean stopping = new SynchronizedBoolean(false);
    14          CircularQueue queue = new CircularQueue(10, stopping);
    15          for (int i = 0; i < 10; i++) {
    16              queue.returnObject(new Object());
    17          }
    18          stopping.set(true);
    19          int i=0;
    20
    21          queue.drain();
    22      }
    23
    24  }