[infinispan-issues] [JBoss JIRA] (ISPN-2443) DistributedTaskPart get(timeout, TimeUnit) throws ClassCastException in case the execution is not finished after specified time
Mircea Markus (JIRA)
jira-events at lists.jboss.org
Fri Nov 2 11:22:18 EDT 2012
[ https://issues.jboss.org/browse/ISPN-2443?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mircea Markus resolved ISPN-2443.
---------------------------------
Resolution: Done
> DistributedTaskPart get(timeout, TimeUnit) throws ClassCastException in case the execution is not finished after specified time
> -------------------------------------------------------------------------------------------------------------------------------
>
> Key: ISPN-2443
> URL: https://issues.jboss.org/browse/ISPN-2443
> Project: Infinispan
> Issue Type: Bug
> Components: Distributed Execution and Map/Reduce
> Affects Versions: 5.2.0.Beta2
> Reporter: Anna Manukyan
> Assignee: Vladimir Blagojevic
> Fix For: 5.2.0.CR1, 5.2.0.Final
>
>
> The issue appears almost every time the test is executed.
> The case is the following:
> 1. Callable<Integer> is submitted to DistributedExecutorService for execution;
> The callable body consists of simple Thread.sleep(time) which makes the callable to sleep for specific period of time.
> 2. Result is taken with get(long timeout, TimeUnit unit) method;
> The timeout is given so that, it is much more shorter than the sleeping time of the callable. But sometimes it happens, that the get(timeout, unit) waits till the end. I guess this happens due to priority of threads.
> 3. In case of expected execution flow, i.e. if the method execution takes longer than the specified timeout, the following exception is thrown:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.util.Map
> at org.infinispan.distexec.DefaultExecutorService$DistributedTaskPart.retrieveResult(DefaultExecutorService.java:882)
> at org.infinispan.distexec.DefaultExecutorService$DistributedTaskPart.get(DefaultExecutorService.java:818)
> at org.infinispan.distexec.DistributedExecutorTest.testSleepingCallableWithTimeoutOption(DistributedExecutorTest.java:336)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:601)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:74)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:673)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:846)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1170)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
> at org.testng.TestRunner.runWorkers(TestRunner.java:1147)
> at org.testng.TestRunner.privateRun(TestRunner.java:749)
> at org.testng.TestRunner.run(TestRunner.java:600)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:317)
> at org.testng.SuiteRunner.access$000(SuiteRunner.java:34)
> at org.testng.SuiteRunner$SuiteWorker.run(SuiteRunner.java:351)
> at org.testng.internal.thread.ThreadUtil$CountDownLatchedRunnable.run(ThreadUtil.java:147)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
> at java.lang.Thread.run(Thread.java:722)
> The pull request which contains tests reproducing/verifying the issue, is: https://github.com/infinispan/infinispan/pull/1425
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the infinispan-issues
mailing list