Package com.sun.sgs.impl.service.data.store.cache.queue

Examples of com.sun.sgs.impl.service.data.store.cache.queue.RequestQueueClient

@see RequestQueueListener @see RequestQueueServer

    /* Test constructor */

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorNegativeNodeId() {
  new RequestQueueClient(-1, socketFactory, failureReporter, MAX_RETRY,
             RETRY_WAIT, QUEUE_SIZE);
    }
View Full Code Here


             RETRY_WAIT, QUEUE_SIZE);
    }

    @Test(expected=NullPointerException.class)
    public void testConstructorNullSocketFactory() {
  new RequestQueueClient(1, null, failureReporter, MAX_RETRY, RETRY_WAIT,
             QUEUE_SIZE);
    }
View Full Code Here

             QUEUE_SIZE);
    }

    @Test(expected=NullPointerException.class)
    public void testConstructorNullFailureHandler() {
  new RequestQueueClient(1, socketFactory, null, MAX_RETRY, RETRY_WAIT,
             QUEUE_SIZE);
    }
View Full Code Here

             QUEUE_SIZE);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorIllegalMaxRetry() {
  new RequestQueueClient(1, socketFactory, failureReporter, 0, RETRY_WAIT,
             QUEUE_SIZE);
    }
View Full Code Here

             QUEUE_SIZE);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorIllegalRetryWait() {
  new RequestQueueClient(1, socketFactory, failureReporter, MAX_RETRY, 0,
             QUEUE_SIZE);
    }
View Full Code Here

             QUEUE_SIZE);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorQueueSizeTooSmall() {
  new RequestQueueClient(1, socketFactory, failureReporter, MAX_RETRY,
             RETRY_WAIT, 0);
    }
View Full Code Here

             RETRY_WAIT, 0);
    }

    @Test(expected=IllegalArgumentException.class)
    public void testConstructorQueueSizeTooBig() {
  new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      RequestQueueServer.MAX_OUTSTANDING + 1);
    }
View Full Code Here

    @Test
    public void testConnectionServerSocketClosed() throws Exception {
  listener.shutdown();
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  failureReporter.checkCalled(MAX_RETRY);
    }
View Full Code Here

    }

    @Test
    public void testConnectionServerUnknown() throws Exception {
  NoteFailure failureReporter = new NoteFailure();
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  failureReporter.checkCalled(MAX_RETRY);
    }
View Full Code Here

    /* Test addRequest */

    @Test
    public void testAddRequestNullRequest() {
  client = new RequestQueueClient(
      1, socketFactory, failureReporter, MAX_RETRY, RETRY_WAIT,
      QUEUE_SIZE);
  try {
      client.addRequest(null);
      fail("Expected NullPointerException");
View Full Code Here

TOP

Related Classes of com.sun.sgs.impl.service.data.store.cache.queue.RequestQueueClient

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.