Package com.sun.sgs.test.util

Examples of com.sun.sgs.test.util.TestAbstractKernelRunnable


    public void testRunIoTaskInTransaction() throws Exception {
  final DummyService service = createDummyService();
  final IoRunnableImpl ioTask = new IoRunnableImpl(0);
  try {
      txnScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() {
        service.runIoTask(ioTask, serverNode.getNodeId());
    }}, taskOwner);
      fail("expected IllegalStateException");
  } catch (IllegalStateException e) {
View Full Code Here


  }
       
  Thread.sleep(400); // Let it shutdown
 
  try {
      txnScheduler.runTask(new TestAbstractKernelRunnable() {
    public void run() {
                    service.isAlive();
    } }, taskOwner);
     
      fail("Expected IllegalStateException");
View Full Code Here

      throws Exception
  {
      this.handleServiceVersionMismatchInvoked = false;
      this.e = e;
      transactionScheduler.runTask(
    new TestAbstractKernelRunnable() {
        public void run() {
      checkServiceVersion(versionKey, major,  minor);
        }}, taskOwner);
  }
View Full Code Here

                threadAction = new ThreadAction() {
                    protected void action() {
                        try {
                            try {
                                txnScheduler.runTask(
                                    new TestAbstractKernelRunnable() {
                                    public void run() {
                                        try {
                                            action.run();
                                            fail("Expected IllegalStateException");
                                        } catch (IllegalStateException e) {
View Full Code Here

        /* Create objects */
  for (int t = 0; t < maxThreads; t++) {
            final AtomicInteger i = new AtomicInteger(0);
      final int start = t * perThread;
            while (i.get() < perThread) {
                txnScheduler.runTask(new TestAbstractKernelRunnable() {
                        public void run() throws Exception {
                            int ival = i.get();
                            while (ival < perThread) {
        service.setBinding(getObjectName(start + ival),
                                                   new ModifiableObject());
View Full Code Here

        public void run() {
            final AtomicInteger i = new AtomicInteger(0);
            try {
                while (i.get() < operations) {
                    txnScheduler.runTask(new TestAbstractKernelRunnable() {
                            public void run() throws Exception {
                                while (i.get() < operations) {
                                    if (i.get() % 1000 == 0 &&
                                        logger.isLoggable(Level.FINE)) {
                                        logger.log(Level.FINE, "Operation {0}",
View Full Code Here

     *
     * @throws Exception
     */
    @Test
    public void testContainsWithSingleElement() throws Exception {
  txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() throws Exception {
    ScalableList<String> list = new ScalableList<String>(6, 6);
    assertTrue(list.add("A"));

    assertTrue(list.contains("A"));
View Full Code Here

     *
     * @throws Exception
     */
    @Test
    public void testContainsWithPopulatedList() throws Exception {
  txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() throws Exception {
    ScalableList<String> list = new ScalableList<String>(6, 6);
    assertTrue(list.add("A"));
    assertTrue(list.add("B"));
    assertTrue(list.add("C"));
View Full Code Here

     *
     * @throws Exception
     */
    @Test
    public void testContainsAllWithPopulatedList() throws Exception {
  txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() throws Exception {
    ScalableList<String> list = new ScalableList<String>(6, 6);
    assertTrue(list.add("A"));
    assertTrue(list.add("B"));
    assertTrue(list.add("C"));
View Full Code Here

     *
     * @throws Exception
     */
    @Test
    public void testRetainAll() throws Exception {
  txnScheduler.runTask(new TestAbstractKernelRunnable() {
      public void run() throws Exception {
    // test that retainAll returns true if changes are made
    ScalableList<String> list = new ScalableList<String>(6, 6);
    assertTrue(list.add("A"));
    assertTrue(list.add("B"));
View Full Code Here

TOP

Related Classes of com.sun.sgs.test.util.TestAbstractKernelRunnable

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.