Bug 745843 (EDG-73) - org.infinispan.client.hotrod.RemoteCache methods size(), isEmpty() and containsValue() return UnsupportedOperationExeception
Summary: org.infinispan.client.hotrod.RemoteCache methods size(), isEmpty() and contai...
Keywords:
Status: CLOSED NEXTRELEASE
Alias: EDG-73
Product: JBoss Data Grid 5
Classification: JBoss
Component: Infinispan
Version: unspecified
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ---
: EAP 5.1.0 EDG TP
Assignee: Default User
QA Contact:
URL: http://jira.jboss.org/jira/browse/EDG-73
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-01-13 15:55 UTC by Richard Achmatowicz
Modified: 2011-10-11 17:06 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-01-27 10:28:47 UTC
Type: Bug


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker EDG-73 0 None None None Never

Description Richard Achmatowicz 2011-01-13 15:55:37 UTC
Complexity: Low
project_key: EDG

The test case org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase shows these test failures:

  <testcase classname="org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase" name="testSize" time="0.0060">
    <error type="java.lang.UnsupportedOperationException">java.lang.UnsupportedOperationException
	at org.infinispan.client.hotrod.impl.RemoteCacheSupport.size(RemoteCacheSupport.java:71)
	at org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase.testSize(HotRodClientRemoteCacheTestCase.java:283)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
</error>
  </testcase>
  <testcase classname="org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase" name="testIsEmpty" time="0.0050">
    <error type="java.lang.UnsupportedOperationException">java.lang.UnsupportedOperationException
	at org.infinispan.client.hotrod.impl.RemoteCacheSupport.isEmpty(RemoteCacheSupport.java:76)
	at org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase.testIsEmpty(HotRodClientRemoteCacheTestCase.java:307)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
</error>
  </testcase>
  <testcase classname="org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase" name="testContains" time="0.0080">
    <error type="java.lang.UnsupportedOperationException">java.lang.UnsupportedOperationException
	at org.infinispan.client.hotrod.impl.RemoteCacheSupport.containsValue(RemoteCacheSupport.java:81)
	at org.jboss.test.cluster.datagrid.test.HotRodClientRemoteCacheTestCase.testContains(HotRodClientRemoteCacheTestCase.java:327)
	at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
	at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
	at junit.extensions.TestSetup.run(TestSetup.java:25)
</error>
 
These tests perform simple examples of the operation on a default cache instance.

Comment 1 Richard Achmatowicz 2011-01-13 15:58:58 UTC
The version of the test which exhibits the failures have just been committed to https://svn.jboss.org/repos/jbossas/branches/JBPAPP_5_1_datagrid
I'll kick off a Hudson run of the revised testsuite immediately.


Comment 2 Galder Zamarreño 2011-01-27 09:09:37 UTC
containsValue() is not supported in embedded Infinispan and we have no intention of supporting it in the time being.

size() and isEmpty() can easily be implemented by checking the stats returned, I'm creating a JIRA for this - it's pretty straightforward.

Comment 3 Galder Zamarreño 2011-01-27 09:12:06 UTC
Link: Added: This issue depends ISPN-900


Comment 4 Richard Achmatowicz 2011-03-22 19:41:39 UTC
I've set up a test to catch an Unsupported from containsValue().

size() and isEmpty() are still throwing them - any progress with the JIRA?



Comment 5 Galder Zamarreño 2011-03-28 10:08:10 UTC
Richard, the JIRA is fixed. Here's the code:
https://github.com/infinispan/infinispan/blob/4.2.1.CR2/client/hotrod-client/src/main/java/org/infinispan/client/hotrod/impl/RemoteCacheImpl.java

Richard, remember to update the Hot Rod client version in the testsuite. From what I remember there's a separate file somewhere that needs updating when you want to use a different Hot Rod client version.


Note You need to log in before you can comment on or make changes to this bug.