[infinispan-dev] failing queries on one node

Ales Justin ales.justin at gmail.com
Sun Sep 2 19:00:49 EDT 2012


After fixing that ISPN-2253:
* https://github.com/alesj/infinispan/commit/05229f426e829742902de0305488282b8283b8e5
(Sanne is working on even cleaner solution)

It now also looks like our CapeDwarf clustering tests have been (almost) fixed.
It now appears as if one node cannot do proper querying:

Deployment dep1 goes to node1, same deployment dep2 goes to node2.

"Failed tests:   queryOnA(org.jboss.test.capedwarf.cluster.DatastoreTestCase): Number of entities: 0"

Where as "queryOnB" doesn't fail.

@Sanne -- do we have any query tests covering this kind of scenario?

I'm using jgroups' auto-master selection.

Tomorrow I'll try fixed jgroups master/slave selection,
and the new dynamic auto-master selection.

Any ideas still welcome. ;-)

-Ales

---

    @InSequence(30)
    @Test
    @OperateOnDeployment("dep1")
    public void putStoresEntityOnDepA() throws Exception {
        Entity entity = createTestEntity("KIND", 1);
        getService().put(entity);
        assertStoreContains(entity);
    }

    @InSequence(31)
    @Test
    @OperateOnDeployment("dep2")
    public void putStoresEntityOnDepB() throws Exception {
        Entity entity = createTestEntity("KIND", 2);
        getService().put(entity);
        assertStoreContains(entity);
    }

    @InSequence(40)
    @Test
    @OperateOnDeployment("dep1")
    public void getEntityOnDepA() throws Exception {
        waitForSync();

        Key key = KeyFactory.createKey("KIND", 1);
        Entity lookup = getService().get(key);

        Assert.assertNotNull(lookup);

        Entity entity = createTestEntity("KIND", 1);
        Assert.assertEquals(entity, lookup);
    }

    @InSequence(50)
    @Test
    @OperateOnDeployment("dep2")
    public void getEntityOnDepB() throws Exception {
        waitForSync();

        Entity entity = createTestEntity("KIND", 1);
        assertStoreContains(entity);
    }

    @InSequence(52)
    @Test
    @OperateOnDeployment("dep1")
    public void queryOnA() throws Exception {
        waitForSync();

        int count = getService().prepare(new Query("KIND")).countEntities(Builder.withDefaults());
        Assert.assertTrue("Number of entities: " + count, count == 2);
    }

    @InSequence(53)
    @Test
    @OperateOnDeployment("dep2")
    public void queryOnB() throws Exception {
        waitForSync();

        int count = getService().prepare(new Query("KIND")).countEntities(Builder.withDefaults());
        Assert.assertTrue("Number of entities: " + count, count == 2);
    }

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/infinispan-dev/attachments/20120903/1a02c5ab/attachment.html 


More information about the infinispan-dev mailing list