Examples of HypersonicManager


Examples of com.volantis.synergetics.testtools.HypersonicManager

        });
    }

    public void testCreateUnorderedSet() throws Exception {
        // Use the in-memory hypersonic db - no background threads!
        final HypersonicManager hypersonicMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        hypersonicMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {

                InternalJDBCRepository repository = createRepository(
                        hypersonicMgr.getSource(), null, "#dp");
                JDBCRepositoryConnection connection =
                        (JDBCRepositoryConnection) repository.connect();
                JDBCDeviceRepositoryAccessor accessor =
                        new JDBCDeviceRepositoryAccessor(repository, location);
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

        });
    }

    public void testRemoveUnorderedSet() throws Exception {
        // Use the in-memory hypersonic db - no background threads!
        final HypersonicManager hypersonicMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        hypersonicMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {

                InternalJDBCRepository repository = createRepository(
                        hypersonicMgr.getSource(), null, "#dp");
                JDBCRepositoryConnection connection =
                        (JDBCRepositoryConnection) repository.connect();
                JDBCDeviceRepositoryAccessor accessor =
                        new JDBCDeviceRepositoryAccessor(repository, location);
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

        });
    }

    public void testMany() throws Exception {
        // Use the in-memory hypersonic db - no background threads!
        final HypersonicManager hypersonicMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        hypersonicMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {

                InternalJDBCRepository repository = createRepository(
                        hypersonicMgr.getSource(), null, "#dp");
                JDBCRepositoryConnection connection =
                        (JDBCRepositoryConnection) repository.connect();
                JDBCDeviceRepositoryAccessor accessor =
                        new JDBCDeviceRepositoryAccessor(repository, location);
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

    /**
     * Test the enumerating of all TAC numbers.
     */
    public void testEnumerateDeviceNamesTACNoneFound() throws Exception {
        // Use the in-memory hypersonic db - no background threads!
        final HypersonicManager hypersonicMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        hypersonicMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {

                InternalJDBCRepository repository = createRepository(
                        hypersonicMgr.getSource(), null, defaultProject);
                JDBCRepositoryConnection connection =
                        (JDBCRepositoryConnection) repository.connect();
                JDBCDeviceRepositoryAccessor accessor =
                        new JDBCDeviceRepositoryAccessor(repository, location);

View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

    protected void runDeviceRepositoryAccessorTest(
            final AbstractDeviceRepositoryAccessorTestAbstract.
            DeviceRepositoryAccessorTest test)
            throws Exception {
        // Use the in-memory hypersonic db - no background threads!
        final HypersonicManager hypersonicMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        hypersonicMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {
                InternalJDBCRepository repository = createRepository(
                        hypersonicMgr.getSource(), null, defaultProject);
                JDBCRepositoryConnection connection =
                        (JDBCRepositoryConnection) repository.connect();
                JDBCDeviceRepositoryAccessor accessor =
                        new JDBCDeviceRepositoryAccessor(repository, location);
                Connection conn = connection.getConnection();
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

        // This is required because adding Properties to Categories requires a
        // Schema Parser in SchemaFactory, even though we have validation off.
        Environment.init("/com/volantis/mcs/ibm/ucp/ucp-config.xml");

        // Use the in-memory hypersonic db - no background threads!
        final HypersonicManager hypersonicMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        hypersonicMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {

                // Create the database tables.
                // todo: this should be refactored to be re-usable, see the
                // to do comment in the class comment.
                Connection connection = DriverManager.getConnection(
                        hypersonicMgr.getUrl(),
                        HypersonicManager.DEFAULT_USERNAME,
                        HypersonicManager.DEFAULT_PASSWORD);
                Statement statement = connection.createStatement();
                // Create the device patterns table
                String sql = "CREATE TABLE VMDEVICE_PATTERNS ( " +
                        "PROJECT   VARCHAR (255)  NOT NULL," +
                        "NAME      VARCHAR (20)  NOT NULL," +
                        "PATTERN   VARCHAR (255)  NOT NULL," +
                        "REVISION  NUMERIC (9)   DEFAULT 0" +
                        " ) ";
                statement.execute(sql);
                statement.close();
                statement = connection.createStatement();
                // Create the device patterns table
                sql = "CREATE TABLE VMPOLICY_VALUES ( " +
                        "PROJECT   VARCHAR (255)  NOT NULL," +
                        "NAME      VARCHAR (20)  NOT NULL," +
                        "POLICY    VARCHAR (200)  NOT NULL," +
                        "VALUE     VARCHAR (1024)," +
                        "REVISION  NUMERIC (9)   DEFAULT 0" +
                        " ) ";
                statement.execute(sql);
                statement.close();
                // Note: must leave connection open so that subsequent code
                // can find the tables we just created.

                final HashMap params = new HashMap();
                params.put("repository-type", "jdbc");
                // todo: all these values should come from the db manager class.
                params.put("odbc-user", HypersonicManager.DEFAULT_USERNAME);
                params.put("odbc-password", HypersonicManager.DEFAULT_PASSWORD);
                params.put("odbc-source", hypersonicMgr.getSource());
                params.put("odbc-vendor", "hypersonic");
                // NOTE: our old style devices don't currently use default
                // project but we need to provide it or the test fails...
                params.put("project", "#DefaultProject");
//                params.put("odbc-host", "not used");
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

    }

    public void setUp() throws Exception {
        super.setUp();
        hypersonicManager =
                new HypersonicManager(HypersonicManager.IN_MEMORY_SOURCE);
    }
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

     * Set up the bean and an empty ServletContext.
     */
    public void setUp()
            throws ClassNotFoundException, SQLException, IOException {
        // NOTE: using the default file source, leaves background threads around...
        hypersonicManager = new HypersonicManager();
        webXMLInputStream =
                SecondaryIDHeaderTestCase.class.getResourceAsStream("web.xml");
    }
View Full Code Here

Examples of com.volantis.synergetics.testtools.HypersonicManager

        // TODO: fix this test by creating a valid hypersonic repository?
        // NOTE: This is disabled as it is broken. It requires a proper
        // device repository to be created for initialisation to complete.
        // It only "worked" originally because of a bug in
        // Volantis.initializeInternal where exceptions were thrown away.
        final HypersonicManager dbMgr = new HypersonicManager(
                HypersonicManager.IN_MEMORY_SOURCE);
        dbMgr.useCleanupWith(new Executor() {
            public void execute() throws Exception {
                ConfigChecker checker =
                        new ConfigChecker(volantis,
                                servletContext);
                checker.setAppConf(new MandatoryAppConfigurator() {
                    public void setUp(ConfigValue config) throws Exception {
                        // Include mandatory stuff.
                        super.setUp(config);
                        // Add in some repository properties
                        config.repositoryType = "odbc";
                        // vaguely correct values for the db we are using
                        config.repositoryUser =
                                HypersonicManager.DEFAULT_USERNAME;
                        config.repositoryPassword =
                                HypersonicManager.DEFAULT_PASSWORD;
                        config.repositoryVendor = "hypersonic";
                        config.repositorySource = dbMgr.getSource();
                        ConfigProjectPoliciesJdbcValue jdbcPolicies =
                                new ConfigProjectPoliciesJdbcValue();
                        jdbcPolicies.projectName = "#DefaultProject";
                        config.defaultProjectPolicies = jdbcPolicies;
                        // These are unused by Hypersonic but we can check.
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.