Strange behaviour of getSelect() in QueryServiceImplTest

1 view
Skip to first unread message

sramazzina

unread,
Jan 4, 2010, 5:47:05 PM1/4/10
to pentahoanalysistool-dev
Hi guys,

I've fixed all the failing tests except one because of a strange
behaviour of the getSelect() method in the Olap4J's Query object. The
failing test class is QueryServiceImplTest and the test method is
testMoveDimensions(). The exception raised is the following

java.lang.IndexOutOfBoundsException: Index: 0, Size: 0
at java.util.ArrayList.RangeCheck(ArrayList.java:547)
at java.util.ArrayList.get(ArrayList.java:322)
at org.olap4j.query.Olap4jNodeConverter.toOlap4j
(Olap4jNodeConverter.java:212)
at org.olap4j.query.Olap4jNodeConverter.toOlap4j
(Olap4jNodeConverter.java:405)
at org.olap4j.query.Olap4jNodeConverter.toOlap4j
(Olap4jNodeConverter.java:49)
at org.olap4j.query.Query.getSelect(Query.java:86)
at
org.pentaho.pat.server.services.impl.QueryServiceImplTest.testMoveDimensions
(QueryServiceImplTest.java:87)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke
(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke
(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at junit.framework.TestCase.runTest(TestCase.java:168)
at junit.framework.TestCase.runBare(TestCase.java:134)
at junit.framework.TestResult$1.protect(TestResult.java:110)
at junit.framework.TestResult.runProtected(TestResult.java:128)
at junit.framework.TestResult.run(TestResult.java:113)
at junit.framework.TestCase.run(TestCase.java:124)
at junit.framework.TestSuite.runTest(TestSuite.java:232)
at junit.framework.TestSuite.run(TestSuite.java:227)
at org.junit.internal.runners.JUnit38ClassRunner.run
(JUnit38ClassRunner.java:79)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run
(JUnit4TestReference.java:46)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run
(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:467)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
(RemoteTestRunner.java:683)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
(RemoteTestRunner.java:390)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
(RemoteTestRunner.java:197)


I committed a slightly modified version of this method just to put in
evidence the failure of this API with the preconditions set in the
test. The strange thing is that the same call works two lines ahead in
another test method of the same class (testSelections()). There the
test is quite the same and the only difference is that we've
selections for each dimension.

Unfortunately my knowledge at the moment is not so deep to fully
understand what happens in Olap4J so I hope that Will or Julian would
like to take care about this issue so I can definitely fix the entire
suite and move forward. I've tried to follow olap4j code to find out
what takes me crazy but our olap4j's version is patched and I'm not
able to properly follow the code.

Kind regards

Sergio

Reply all
Reply to author
Forward
0 new messages