Skip to content

Commit

Permalink
Sorts the lists evaluated in the access control tests so their order …
Browse files Browse the repository at this point in the history
…is deterministic.

git-svn-id: https://olap4j.svn.sourceforge.net/svnroot/olap4j/trunk@474 c6a108a4-781c-0410-a6c6-c2d559e19af0
  • Loading branch information
lucboudreau committed Sep 13, 2011
1 parent 2081404 commit 71d43c2
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions testsrc/org/olap4j/ConnectionTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -2979,7 +2979,7 @@ public void testSchemaAccessControl() throws Exception {
{
list.add(schema.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"FoodMart"),
list);
Expand Down Expand Up @@ -3007,7 +3007,7 @@ public void testCubeAccessControl() throws Exception {
for (Cube cube : olapConnection.getOlapSchema().getCubes()) {
list.add(cube.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"Sales"),
list);
Expand All @@ -3016,7 +3016,7 @@ public void testCubeAccessControl() throws Exception {
for (Cube cube : olapConnection.getOlapSchema().getCubes()) {
list.add(cube.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"Sales Ragged",
"Warehouse",
Expand Down Expand Up @@ -3052,7 +3052,7 @@ public void testDimensionAccessControl() throws Exception {
{
list.add(dimension.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"Measures",
"Store",
Expand Down Expand Up @@ -3097,7 +3097,7 @@ public void testLevelAccessControl() throws Exception {
{
list.add(level.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"State Province",
"City"),
Expand Down Expand Up @@ -3148,7 +3148,7 @@ public void testLevelMembersAccessControl() throws Exception {
{
list.add(member.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"CA"),
list);
Expand All @@ -3163,7 +3163,7 @@ public void testLevelMembersAccessControl() throws Exception {
{
list.add(member.getName());
}
assertEquals(
assertListsEquals(
Arrays.asList(
"Alameda",
"Beverly Hills",
Expand Down Expand Up @@ -3212,6 +3212,12 @@ public void testParentChildAccessControl() throws Exception {
olapConnection.setRoleName(null);
}
}

protected void assertListsEquals(List<String> list1, List<String> list2) {
Collections.sort(list1);
Collections.sort(list2);
assertEquals(list1, list2);
}
}

// End ConnectionTest.java
Expand Down

0 comments on commit 71d43c2

Please sign in to comment.