PDA

View Full Version : [Mondrian] RolapResultTest failing



Pappyn Bart
03-06-2007, 04:00 AM
Richard,

After running regression tests on my system (Windows 2003, jdk1.5.0_10),
I notice
both test in RolapResultTest are failing.

At first, I looks like both results are the same, but taking a closer
look, using the debugger,
I notice that the resultString contains \r and the RESULTS_ALL string
not. I think this has
something to do with the fact I am running the tests on a Windows
platform.

testAll() :

Actual :

"resultString"= "Axis #0:\r\n{}\r\nAxis #1:\r\n{[D1].[All
D1s].[a]}\r\n{[D1].[All D1s].[b]}\r\n{[D1].[All D1s].[c]}\r\nAxis
#2:\r\n{[D2].[All D2s].[x]}\r\n{[D2].[All D2s].[y]}\r\n{[D2].[All
D2s].[z]}\r\nRow #0: 5\r\nRow #0: \r\nRow #0: \r\nRow #1: \r\nRow #1:
10\r\nRow #1: \r\nRow #2: \r\nRow #2: \r\nRow #2: 15\r\n"

Expected:

"RESULTS_ALL"= "Axis #0:\n{}\nAxis #1:\n{[D1].[All D1s].[a]}\n{[D1].[All
D1s].[b]}\n{[D1].[All D1s].[c]}\nAxis #2:\n{[D2].[All
D2s].[x]}\n{[D2].[All D2s].[y]}\n{[D2].[All D2s].[z]}\nRow #0: 5\nRow
#0: \nRow #0: \nRow #1: \nRow #1: 10\nRow #1: \nRow #2: \nRow #2: \nRow
#2: 15\n"


I guess this has something to do with the way you have written the
assert. Can you give a
try with assertEquals instead ?

Bart

_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian

Julian Hyde
03-06-2007, 05:50 AM
Richard,

Can you wrap the expected-result strings in the 'TestContext.fold()'
function. That should fix the problem. The idea is that you use '\n'
characters on all platforms, and fold() will convert to '\r\n' as
necessary.

Also, most of those tests should just use
TestContext.assertQueryReturns(String, String).

Julian



_____

From: mondrian-bounces (AT) pentaho (DOT) org [mailto:mondrian-bounces (AT) pentaho (DOT) org]
On Behalf Of Pappyn Bart
Sent: Monday, March 05, 2007 11:54 PM
To: mondrian (AT) pentaho (DOT) org
Subject: [Mondrian] RolapResultTest failing


Richard,

After running regression tests on my system (Windows 2003, jdk1.5.0_10),
I notice
both test in RolapResultTest are failing.

At first, I looks like both results are the same, but taking a closer
look, using the debugger,
I notice that the resultString contains \r and the RESULTS_ALL string
not. I think this has
something to do with the fact I am running the tests on a Windows
platform.

testAll() :

Actual :

"resultString"= "Axis #0:\r\n{}\r\nAxis #1:\r\n{[D1].[All
D1s].[a]}\r\n{[D1].[All D1s].[b]}\r\n{[D1].[All D1s].[c]}\r\nAxis
#2:\r\n{[D2].[All D2s].[x]}\r\n{[D2].[All D2s].[y]}\r\n{[D2].[All
D2s].[z]}\r\nRow #0: 5\r\nRow #0: \r\nRow #0: \r\nRow #1: \r\nRow #1:
10\r\nRow #1: \r\nRow #2: \r\nRow #2: \r\nRow #2: 15\r\n"

Expected:

"RESULTS_ALL"= "Axis #0:\n{}\nAxis #1:\n{[D1].[All D1s].[a]}\n{[D1].[All
D1s].[b]}\n{[D1].[All D1s].[c]}\nAxis #2:\n{[D2].[All
D2s].[x]}\n{[D2].[All D2s].[y]}\n{[D2].[All D2s].[z]}\nRow #0: 5\nRow
#0: \nRow #0: \nRow #1: \nRow #1: 10\nRow #1: \nRow #2: \nRow #2: \nRow
#2: 15\n"


I guess this has something to do with the way you have written the
assert. Can you give a
try with assertEquals instead ?

Bart


_______________________________________________
Mondrian mailing list
Mondrian (AT) pentaho (DOT) org
http://lists.pentaho.org/mailman/listinfo/mondrian