Package org.apache.derby.drda

Examples of org.apache.derby.drda.NetworkServerControl.shutdown()


        createDatabase();
       
        NetworkServerControl server = NetworkServerTestSetup.getNetworkServerControl();

        // shut down the server
        server.shutdown();

        // check if db.lck exists
        String fileName = getSystemProperty("derby.system.home") +
                java.io.File.separator +
                TestConfiguration.getCurrent().getDefaultDatabaseName() +
View Full Code Here


       
        NetworkServerTestSetup.waitForServerStart(server);
        int sizeAfterPing = bos.size();
        assertTrue("Create log with start message", 0 < sizeAfterPing);       
       
        server.shutdown();

        // DERBY-5598: The shutdown command doesn't wait until the message has
        // been written before it returns. Give the message a little time (up
        // to half a minute) to propagate to the log.
        int sizeAfterShutDown = bos.size();
View Full Code Here

                .getByName(TestConfiguration.getCurrent().getHostName()),
                TestConfiguration.getCurrent().getPort());

        server.start(null);
        NetworkServerTestSetup.waitForServerStart(server);
        server.shutdown();

        //to show this is a right workflow.
        assertTrue(true);
    }
View Full Code Here

        // Check the server is up and then bring it back down
        NetworkServerControl ns = NetworkServerTestSetup
                .getNetworkServerControl(theport);
        NetworkServerTestSetup.waitForServerStart(ns);
        ns.shutdown();
        assertFalse
            (NetworkServerTestSetup.pingForServerUp(ns, null, false));
    }

    /**
 
View Full Code Here

            }
        }

        assertTrue(checkLog( logFileName, new String[] {expectedString}));
       
        ns.shutdown();
    }

    private static boolean checkLog( String logFileName, String[] expected)
            throws IOException
    {
View Full Code Here

        NetworkServerTestSetup.pingForServerStart(control);

        // Shut down the server with the default credentials, which contain
        // non-ASCII characters. See NON_ASCII_USER and NON_ASCII_PASSWORD.
        // This call used to hang forever before DERBY-6457 was fixed.
        control.shutdown();

        // Verify that the server is down.
        NetworkServerTestSetup.pingForServerUp(control, null, false);
    }
View Full Code Here

       
        assertEquals("Network Server state incorrect",
                serverShouldBeUp, isServerUp);
       
        if (isServerUp)
            control.shutdown();
    }
   
    /**
     * Return true if a full auto-boot of the engine is expected
     * due to jdbc.drivers containing the name of the embedded driver.
View Full Code Here

        File traceDirF = new File(traceDir);

        checkAccessToOwner(
            traceDirF, true, POSITIVE);
        nsctrl.shutdown();
        assertDirectoryDeleted(traceDirF);
    }


    public void doTestNonCliServerIsLax() throws Exception {
View Full Code Here

        File traceDirF = new File(traceDir);

        checkAccessToOwner(
            traceDirF, true, NEGATIVE);

        nsctrl.shutdown();
        assertDirectoryDeleted(traceDirF);
    }


    public void dotestEmbeddedIsLax() throws Exception {
View Full Code Here

        try {
            if (specifyPort)
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControl(port);
                nsctrl.shutdown();
            }
            else
            {
                NetworkServerControl nsctrl =
                    NetworkServerTestSetup.getNetworkServerControlDefault();
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.