Package net.greghaines.jesque.client

Examples of net.greghaines.jesque.client.Client.acquireLock()


    @Test
    public void acquireLockSuccess() {
        LOG.info("Running acquireLockSuccess()...");
        final Client client = new ClientImpl(CONFIG);
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
    }

    @Test
View Full Code Here


    @Test
    public void acquireLockSuccess() {
        LOG.info("Running acquireLockSuccess()...");
        final Client client = new ClientImpl(CONFIG);
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
    }

    @Test
    public void acquireLockFail() {
View Full Code Here

    public void acquireLockSuccess() {
        LOG.info("Running acquireLockSuccess()...");
        final Client client = new ClientImpl(CONFIG);
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "me", 10));
    }

    @Test
    public void acquireLockFail() {
        LOG.info("Running acquireLockFail()...");
View Full Code Here

    @Test
    public void acquireLockFail() {
        LOG.info("Running acquireLockFail()...");
        final Client client = new ClientImpl(CONFIG);
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "pete", 10000));
        Assert.assertFalse("Acquired lock that should have been in use.",
                client.acquireLock("systemLockA", "george", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "pete", 10000));
    }
View Full Code Here

    public void acquireLockFail() {
        LOG.info("Running acquireLockFail()...");
        final Client client = new ClientImpl(CONFIG);
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "pete", 10000));
        Assert.assertFalse("Acquired lock that should have been in use.",
                client.acquireLock("systemLockA", "george", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "pete", 10000));
    }

    @Test
    public void unpermittedJob() {
View Full Code Here

        LOG.info("Running acquireLockFail()...");
        final Client client = new ClientImpl(CONFIG);
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "pete", 10000));
        Assert.assertFalse("Acquired lock that should have been in use.",
                client.acquireLock("systemLockA", "george", 10));
        Assert.assertTrue("Failed to acquire the expected lock.", client.acquireLock("systemLockA", "pete", 10000));
    }

    @Test
    public void unpermittedJob() {
        final Job job = new Job("TestAction", new Object[] { 1, 2.3, true, "test", Arrays.asList("inner", 4.5) });
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.