Examples of SgsTestNode


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

                      NodeType.coreServerNode.name());
        setUp(p);
    }

    protected void setUp(Properties props) throws Exception {
        serverNode = new SgsTestNode(APP_NAME, null, props);
        profileCollector = getCollector(serverNode);
        systemRegistry = serverNode.getSystemRegistry();
        txnScheduler = systemRegistry.getComponent(TransactionScheduler.class);
        taskOwner = serverNode.getProxy().getCurrentOwner();
    }
View Full Code Here

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

    private void addNodes(Properties props, int num) throws Exception {
        // Create the other nodes
        additionalNodes = new SgsTestNode[num];

        for (int i = 0; i < num; i++) {
            SgsTestNode node = new SgsTestNode(serverNode, null, props);
            additionalNodes[i] = node;
        }
    }
View Full Code Here

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

        return SgsTestNode.getDefaultProperties(
                "TestKernelCustomServices", serverNode, null);
    }

    private void startCoreNode(Properties props) throws Exception {
        serverNode = new SgsTestNode("TestKernelCustomServices", null, props);
    }
View Full Code Here

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

    private void startCoreNode(Properties props) throws Exception {
        serverNode = new SgsTestNode("TestKernelCustomServices", null, props);
    }

    private void startAppNode(Properties props) throws Exception {
        additionalNode = new SgsTestNode(serverNode, null, props);
    }
View Full Code Here

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

        // Use the platform mbean server, as this is the default for the
        // product.  Most tests create their own mbean server to allow
        // multiple nodes to be created in one VM.
        props.setProperty(ProfileCollectorImpl.CREATE_MBEAN_SERVER_PROPERTY,
                          "false");
        serverNode = new SgsTestNode(APP_NAME, null, props);
        profileCollector = getCollector(serverNode);
        systemRegistry = serverNode.getSystemRegistry();
        txnScheduler = systemRegistry.getComponent(TransactionScheduler.class);
        taskOwner = serverNode.getProxy().getCurrentOwner();
    }
View Full Code Here

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

    private void addNodes(Properties props, int num) throws Exception {
        // Create the other nodes
        additionalNodes = new SgsTestNode[num];

        for (int i = 0; i < num; i++) {
            SgsTestNode node = new SgsTestNode(serverNode, null, props);
            additionalNodes[i] = node;
        }
    }
View Full Code Here

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

        NotificationEmitter notifyProxy = (NotificationEmitter) proxy;
        TestJMXNotificationListener listener =
                new TestJMXNotificationListener();
        notifyProxy.addNotificationListener(listener, null, null);
        // add another node
        SgsTestNode node3 = null;
        try {
            node3 = new SgsTestNode(serverNode, null, null);
            // We expect to see one notification for a started node
            AtomicLong count = listener.notificationMap.get(
                                NodesMXBean.NODE_STARTED_NOTIFICATION);
            assertNotNull(count);
            assertEquals(1, count.longValue());
           
            // and no notifications for failed nodes
            assertNull(listener.notificationMap.get(
                                NodesMXBean.NODE_FAILED_NOTIFICATION));
        } finally {
            if (node3 != null) {
                node3.shutdown(false);
            }
            // Shutdown takes a little while...need to detect that the
            // node is gone
            int renewTime = Integer.valueOf(serverNode.getServiceProperties().
                getProperty(
View Full Code Here

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

        Properties properties =
            SgsTestNode.getDefaultProperties("TestTransactionSchedulerImpl",
               null, null);
        properties.setProperty(StandardProperties.NODE_TYPE,
                               NodeType.coreServerNode.name());
        serverNode = new SgsTestNode("TestTransactionSchedulerImpl",
                                     null, properties);
        txnScheduler = (TransactionSchedulerImpl) serverNode.
                getSystemRegistry().getComponent(TransactionScheduler.class);
        taskOwner = serverNode.getProxy().getCurrentOwner();
    }
View Full Code Here

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

        props.setProperty(StandardProperties.AUTHENTICATORS,
                      "com.sun.sgs.test.util.SimpleTestIdentityAuthenticator");
  props.setProperty("com.sun.sgs.impl.service.watchdog.server.renew.interval",
        "1000");
  serverNode =
      new SgsTestNode(APP_NAME, null, props, clean);

        txnScheduler =
            serverNode.getSystemRegistry().
            getComponent(TransactionScheduler.class);
        taskOwner = serverNode.getProxy().getCurrentOwner();
View Full Code Here

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

        String appName = "TestMultiNodeTaskServiceImpl";
        String dbDirectory = System.getProperty("java.io.tmpdir") +
      File.separator + appName + ".db";

        serverNode = new SgsTestNode(appName, null,
                                     createProps(true, appName, dbDirectory));
        addNodes(createProps(false, appName, dbDirectory), 1);
       
        txnSchedulerZero = serverNode.getSystemRegistry().
            getComponent(TransactionScheduler.class);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.