Skip to content

Commit

Permalink
NXP-8558: fix sql server test failures
Browse files Browse the repository at this point in the history
  • Loading branch information
Florent Guillaume committed Jan 21, 2012
1 parent 6190b8e commit 36186b5
Showing 1 changed file with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@

package org.nuxeo.ecm.platform.content.template.tests;

import java.util.Collections;

import org.nuxeo.ecm.core.api.DocumentModel;
import org.nuxeo.ecm.core.api.DocumentModelList;
import org.nuxeo.ecm.core.storage.sql.SQLRepositoryTestCase;
Expand Down Expand Up @@ -55,6 +57,12 @@ public void testHandler() throws Exception {
DocumentModelList rootChildren = session.getChildren(root.getRef());
assertEquals(2, rootChildren.size());

// query result order is not fixed
if (!"default-domain".equals(rootChildren.get(0).getName())) {
Collections.reverse(rootChildren);
}
assertEquals("default-domain", rootChildren.get(0).getName());

DocumentModel child = rootChildren.get(1);
assertNotNull(child);
assertEquals(SimplePostContentCreationHandler.DOC_NAME, child.getName());
Expand Down

0 comments on commit 36186b5

Please sign in to comment.