Package org.apache.hivemind.impl

Examples of org.apache.hivemind.impl.ShutdownCoordinatorImpl


    }

    public void testShutdownCoordinator()
    {
        ShutdownCoordinator c = new ShutdownCoordinatorImpl();

        Fixture f = new Fixture();

        c.addRegistryShutdownListener(f);

        c.shutdown();

        assertEquals(true, f.isShutdown());

        // For good riddens; test no failure if already down.

        c.shutdown();
    }
View Full Code Here


        assertEquals(true, f.isShutdown());
    }

    public void testShutdownFailure() throws Exception
    {
        ShutdownCoordinator c = new ShutdownCoordinatorImpl();

        c.addRegistryShutdownListener(new RegistryShutdownListener()
        {
            public void registryDidShutdown()
            {
                throw new ApplicationRuntimeException("I'm just not in the mood.");
            }
        });

        interceptLogging();

        c.shutdown();

        assertLoggedMessagePattern("Unable to shutdown .*: I'm just not in the mood\\.");
    }
View Full Code Here

    }

    public void testShutdownCoordinator()
    {
        ShutdownCoordinator c = new ShutdownCoordinatorImpl();

        Fixture f = new Fixture();

        c.addRegistryShutdownListener(f);

        c.shutdown();

        assertEquals(true, f.isShutdown());

        // For good riddens; test no failure if already down.

        c.shutdown();
    }
View Full Code Here

        assertEquals(true, f.isShutdown());
    }

    public void testShutdownFailure() throws Exception
    {
        ShutdownCoordinator c = new ShutdownCoordinatorImpl();

        c.addRegistryShutdownListener(new RegistryShutdownListener()
        {
            public void registryDidShutdown()
            {
                throw new ApplicationRuntimeException("I'm just not in the mood.");
            }
        });

        interceptLogging();

        c.shutdown();

        assertLoggedMessagePattern("Unable to shutdown .*: I'm just not in the mood\\.");
    }
View Full Code Here

TOP

Related Classes of org.apache.hivemind.impl.ShutdownCoordinatorImpl

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.