[exo-jcr-commits] exo-jcr SVN: r786 - in jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage: jbosscache and 1 other directory.
do-not-reply at jboss.org
do-not-reply at jboss.org
Fri Nov 20 06:17:03 EST 2009
Author: areshetnyak
Date: 2009-11-20 06:17:03 -0500 (Fri, 20 Nov 2009)
New Revision: 786
Added:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java
Modified:
jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java
Log:
EXOJCR-203 : The test JBossCacheRestartTest was added.
Modified: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java 2009-11-20 09:50:37 UTC (rev 785)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/JDBCWorkspaceDataContainerTestBase.java 2009-11-20 11:17:03 UTC (rev 786)
@@ -215,6 +215,9 @@
mixins.add(Constants.EXO_PRIVILEGEABLE);
mixins.add(Constants.EXO_OWNEABLE);
addDbProperty(conn, Constants.ROOT_PATH, Constants.ROOT_UUID, Constants.JCR_MIXINTYPES, mixins, true);
+
+ // add property exo:owner
+ addDbProperty(conn, Constants.ROOT_PATH, Constants.ROOT_UUID, Constants.EXO_OWNER, "admin", false);
conn.commit();
}
Added: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java
===================================================================
--- jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java (rev 0)
+++ jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java 2009-11-20 11:17:03 UTC (rev 786)
@@ -0,0 +1,69 @@
+/*
+ * Copyright (C) 2003-2009 eXo Platform SAS.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Affero General Public License
+ * as published by the Free Software Foundation; either version 3
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, see<http://www.gnu.org/licenses/>.
+ */
+package org.exoplatform.services.jcr.impl.storage.jbosscache;
+
+import java.io.Serializable;
+
+import org.exoplatform.services.jcr.access.AccessControlList;
+import org.exoplatform.services.jcr.datamodel.InternalQName;
+import org.exoplatform.services.jcr.datamodel.QPath;
+import org.exoplatform.services.jcr.impl.Constants;
+import org.exoplatform.services.jcr.impl.dataflow.TransientNodeData;
+import org.exoplatform.services.jcr.impl.dataflow.TransientPropertyData;
+import org.exoplatform.services.jcr.impl.dataflow.TransientValueData;
+import org.jboss.cache.Fqn;
+import org.jboss.cache.Node;
+
+/**
+ * Created by The eXo Platform SAS.
+ *
+ * <br/>Date: 2009
+ *
+ * @author <a href="mailto:alex.reshetnyak at exoplatform.com.ua">Alex Reshetnyak</a>
+ * @version $Id$
+ */
+public class JBossCacheRestartTest
+ extends AbstractJBossCacheStorageConnectionTest
+{
+ protected String getDataSourceName()
+ {
+ return "jdbc_name";
+ }
+
+ public void testAddNode() throws Exception
+ {
+ // add root (/)
+ initJCRRoot();
+
+ // check before stop
+ Node<Serializable, Object> rNode = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.NODES, Constants.ROOT_UUID));
+ assertNotNull("Node expected", rNode);
+ checkNode(rNode, Constants.ROOT_UUID, Constants.ROOT_PATH);
+
+ // stop cache
+ cache.stop();
+ cache.destroy();
+
+ // start cache
+ super.setUp();
+
+ // check after restart
+ rNode = cache.getRoot().getChild(Fqn.fromElements(JBossCacheStorage.NODES, Constants.ROOT_UUID));
+ assertNotNull("Node expected", rNode);
+ checkNode(rNode, Constants.ROOT_UUID, Constants.ROOT_PATH);
+ }
+}
Property changes on: jcr/branches/1.12.0-JBC/component/core/src/test/java/org/exoplatform/services/jcr/impl/storage/jbosscache/JBossCacheRestartTest.java
___________________________________________________________________
Name: svn:keywords
+ Id
Name: svn:eol-style
+ native
More information about the exo-jcr-commits
mailing list