[dna-commits] DNA SVN: r1400 - trunk/dna-jcr/src/test/java/org/jboss/dna/jcr.

dna-commits at lists.jboss.org dna-commits at lists.jboss.org
Fri Dec 4 01:56:40 EST 2009


Author: rhauch
Date: 2009-12-04 01:56:40 -0500 (Fri, 04 Dec 2009)
New Revision: 1400

Modified:
   trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrObservationManagerTest.java
   trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java
Log:
DNA-456 Added the observation-related tests that were failing before and commented out, since they now work with the previous commit.

Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrObservationManagerTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrObservationManagerTest.java	2009-12-04 06:56:15 UTC (rev 1399)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrObservationManagerTest.java	2009-12-04 06:56:40 UTC (rev 1400)
@@ -46,7 +46,6 @@
 import javax.jcr.observation.EventIterator;
 import javax.jcr.observation.EventListener;
 import javax.jcr.observation.ObservationManager;
-import junit.framework.TestResult;
 import junit.framework.TestSuite;
 import org.apache.jackrabbit.test.api.observation.AddEventListenerTest;
 import org.apache.jackrabbit.test.api.observation.EventIteratorTest;
@@ -240,9 +239,7 @@
      * @see AddEventListenerTest#testUUID()
      */
     @Test
-    @Ignore
     public void shouldNotReceiveEventIfUuidDoesNotMatch() throws Exception {
-        System.out.println("shouldNotReceiveEventIfUuidDoesNotMatch");
         // setup
         Node n1 = getRoot().addNode("node1", UNSTRUCTURED);
         n1.addMixin(REF_MIXIN);
@@ -270,9 +267,7 @@
     }
 
     @Test
-    @Ignore
     public void shouldNotReceiveEventIfNodeTypeDoesNotMatch() throws Exception {
-        System.out.println("shouldNotReceiveEventIfNodeTypeDoesNotMatch");
         // setup
         Node node1 = getRoot().addNode("node1", UNSTRUCTURED);
         save();
@@ -293,9 +288,7 @@
     }
 
     @Test
-    @Ignore
     public void shouldReceiveNodeAddedEventWhenRegisteredToReceiveAllEvents() throws Exception {
-        System.out.println("shouldReceiveNodeAddedEventWhenRegisteredToReceiveAllEvents");
         // register listener (add + 3 property events)
         Node root = getRoot();
         save();
@@ -316,9 +309,7 @@
     }
 
     @Test
-    @Ignore
     public void shouldReceiveNodeRemovedEventWhenRegisteredToReceiveAllEvents() throws Exception {
-        System.out.println("shouldReceiveNodeRemovedEventWhenRegisteredToReceiveAllEvents");
         // add the node that will be removed
         Node addedNode = getRoot().addNode("node1", UNSTRUCTURED);
         save();
@@ -342,9 +333,7 @@
     }
 
     @Test
-    @Ignore
     public void shouldReceivePropertyAddedEventWhenRegisteredToReceiveAllEvents() throws Exception {
-        System.out.println("shouldReceivePropertyAddedEventWhenRegisteredToReceiveAllEvents");
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
         save();
@@ -367,9 +356,7 @@
     }
 
     @Test
-    @Ignore
     public void shouldReceivePropertyChangedEventWhenRegisteredToReceiveAllEvents() throws Exception {
-        System.out.println("shouldReceivePropertyChangedEventWhenRegisteredToReceiveAllEvents");
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
         Property prop1 = node.setProperty("prop1", "prop1 content");
@@ -393,9 +380,7 @@
     }
 
     @Test
-    @Ignore
     public void shouldReceivePropertyRemovedEventWhenRegisteredToReceiveAllEvents() throws Exception {
-        System.out.println("shouldReceivePropertyRemovedEventWhenRegisteredToReceiveAllEvents");
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
         Property prop = node.setProperty("prop1", "prop1 content");
@@ -428,9 +413,7 @@
      * @see EventIteratorTest#testGetPosition()
      */
     @Test
-    @Ignore
     public void shouldTestEventIteratorTest_testGetPosition() throws Exception {
-        System.out.println("shouldTestEventIteratorTest_testGetPosition");
         // register listener
         TestListener listener = addListener(3, Event.NODE_ADDED, null, false, null, null, false);
 
@@ -453,7 +436,6 @@
      * @see EventIteratorTest#testGetSize()
      */
     @Test
-    @Ignore
     public void shouldTestEventIteratorTest_testGetSize() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false);
@@ -475,7 +457,6 @@
      * @see EventIteratorTest#testSkip()
      */
     @Test
-    @Ignore
     public void shouldTestEventIteratorTest_testSkip() throws Exception {
         // create events
         List<Event> events = new ArrayList<Event>();
@@ -510,7 +491,6 @@
      * @see EventTest#testGetNodePath()
      */
     @Test
-    @Ignore
     public void shouldTestEventTest_testGetNodePath() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false);
@@ -534,7 +514,6 @@
      * @see EventTest#testGetType()
      */
     @Test
-    @Ignore
     public void shouldTestEventTest_testGetType() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false);
@@ -557,7 +536,6 @@
      * @see EventTest#testGetUserId()
      */
     @Test
-    @Ignore
     public void shouldTestEventTest_testGetUserId() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false);
@@ -584,7 +562,6 @@
      * @see GetRegisteredEventListenersTest#testGetSize()
      */
     @Test
-    @Ignore
     public void shouldTestGetRegisteredEventListenersTest_testGetSize() throws Exception {
         assertThat("A new session must not have any event listeners registered.",
                    getObservationManager().getRegisteredEventListeners().getSize(),
@@ -606,7 +583,6 @@
      * @see GetRegisteredEventListenersTest#testRemoveEventListener()
      */
     @Test
-    @Ignore
     public void shouldTestGetRegisteredEventListenersTest_testRemoveEventListener() throws Exception {
         TestListener listener1 = addListener(0, ALL_EVENTS, null, false, null, null, false);
         EventListener listener2 = addListener(0, ALL_EVENTS, null, false, null, null, false);
@@ -632,7 +608,6 @@
      * @see LockingTest#testAddLockToNode()
      */
     @Test
-    @Ignore
     public void shouldTestLockingTest_testAddLockToNode() throws Exception {
         // setup
         String node1 = "node1";
@@ -661,7 +636,6 @@
      * @see LockingTest#testRemoveLockFromNode()
      */
     @Test
-    @Ignore
     public void shouldTestLockingTest_testRemoveLockFromNode() throws Exception {
         // setup
         String node1 = "node1";
@@ -695,9 +669,7 @@
      * @see NodeAddedTest#testMultipleNodeAdded1()
      */
     @Test
-    @Ignore
     public void shouldTestNodeAddedTest_testMultipleNodeAdded1() throws Exception {
-        System.out.println("shouldTestNodeAddedTest_testMultipleNodeAdded1");
         // register listener
         TestListener listener = addListener(2, Event.NODE_ADDED, null, false, null, null, false);
 
@@ -721,7 +693,6 @@
      * @see NodeAddedTest#testMultipleNodeAdded2()
      */
     @Test
-    @Ignore
     public void shouldTestNodeAddedTest_testMultipleNodeAdded2() throws Exception {
         // register listener
         TestListener listener = addListener(2, Event.NODE_ADDED, null, false, null, null, false);
@@ -746,7 +717,6 @@
      * @see NodeAddedTest#testSingleNodeAdded()
      */
     @Test
-    @Ignore
     public void shouldTestNodeAddedTest_testSingleNodeAdded() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false);
@@ -770,7 +740,6 @@
      * @see NodeAddedTest#testTransientNodeAddedRemoved()
      */
     @Test
-    @Ignore
     public void shouldTestNodeAddedTest_testTransientNodeAddedRemoved() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_ADDED, null, false, null, null, false);
@@ -832,7 +801,6 @@
      * @see NodeRemovedTest#testSingleNodeRemoved()
      */
     @Test
-    @Ignore
     public void shouldTestNodeRemovedTest_testSingleNodeRemoved() throws Exception {
         // register listener
         TestListener listener = addListener(1, Event.NODE_REMOVED, null, false, null, null, false);
@@ -865,7 +833,6 @@
      * @see NodeMovedTest#testMoveNode()
      */
     @Test
-    @Ignore
     public void shouldTestNodeMovedTest_testMoveNode() throws Exception {
         // setup
         String node1 = "node1";
@@ -904,7 +871,6 @@
      * @see NodeMovedTest#testMoveTree()
      */
     @Test
-    @Ignore
     public void shouldTestNodeMovedTest_testMoveTree() throws Exception {
         // setup
         Node n1 = getRoot().addNode("node1", UNSTRUCTURED);
@@ -941,7 +907,6 @@
      * @see NodeMovedTest#testMoveWithRemove()
      */
     @Test
-    @Ignore
     public void shouldTestNodeMovedTest_testMoveWithRemove() throws Exception {
         // setup
         String node2 = "node2";
@@ -988,7 +953,6 @@
      * @see NodeReorderTest#testNodeReorder()
      */
     @Test
-    @Ignore
     public void shouldTestNodeReorderTest_testNodeReorder() throws Exception {
         // setup
         getRoot().addNode("node1", UNSTRUCTURED);
@@ -1024,7 +988,6 @@
      * @see NodeReorderTest#testNodeReorderSameName()
      */
     @Test
-    @Ignore
     public void shouldTestNodeReorderTest_testNodeReorderSameName() throws Exception {
         // setup
         String node1 = "node1";
@@ -1061,7 +1024,6 @@
      * @see NodeReorderTest#testNodeReorderSameNameWithRemove()
      */
     @Test
-    @Ignore
     public void shouldTestNodeReorderTest_testNodeReorderSameNameWithRemove() throws Exception {
         // setup
         String node1 = "node1";
@@ -1107,7 +1069,6 @@
      * @see PropertyAddedTest#testMultiPropertyAdded()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyAddedTest_testMultiPropertyAdded() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1136,7 +1097,6 @@
      * @see PropertyAddedTest#testSinglePropertyAdded()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyAddedTest_testSinglePropertyAdded() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1164,7 +1124,6 @@
      * @see PropertyAddedTest#testSystemGenerated()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyAddedTest_testSystemGenerated() throws Exception {
         // register listener
         TestListener listener = addListener(3, Event.PROPERTY_ADDED, null, false, null, null, false);
@@ -1192,7 +1151,6 @@
      * @see PropertyChangedTest#testMultiPropertyChanged()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyChangedTests_testMultiPropertyChanged() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1223,7 +1181,6 @@
      * @see PropertyChangedTest#testPropertyRemoveCreate()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyChangedTests_testPropertyRemoveCreate() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1266,7 +1223,6 @@
      * @see PropertyChangedTest#testSinglePropertyChanged()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyChangedTests_testSinglePropertyChanged() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1295,7 +1251,6 @@
      * @see PropertyChangedTest#testSinglePropertyChangedWithAdded()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyChangedTests_testSinglePropertyChangedWithAdded() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1329,7 +1284,6 @@
      * @see PropertyRemovedTest#testMultiPropertyRemoved()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyRemovedTest_testMultiPropertyRemoved() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1363,7 +1317,6 @@
      * @see PropertyRemovedTest#testSinglePropertyRemoved()
      */
     @Test
-    @Ignore
     public void shouldTestPropertyRemovedTest_testSinglePropertyRemoved() throws Exception {
         // setup
         Node node = getRoot().addNode("node1", UNSTRUCTURED);
@@ -1488,7 +1441,6 @@
      * @see AddEventListenerTest#testNoLocalTrue()
      */
     @Test
-    @Ignore
     public void shouldTestAddEventListenerTest_testNoLocalTrue() throws Exception {
         // register listener
         TestListener listener = addListener(0, Event.NODE_ADDED, getRoot().getPath(), true, null, null, true);
@@ -1510,9 +1462,7 @@
      * @see AddEventListenerTest#testPath()
      */
     @Test
-    @Ignore
     public void shouldTestAddEventListenerTest_testPath() throws Exception {
-        System.out.println("shouldTestAddEventListenerTest_testPath");
         // setup
         String node1 = "node1";
         String path = getRoot().getPath() + '/' + node1;
@@ -1614,7 +1564,6 @@
      * @see WorkspaceOperationTest#testMove()
      */
     @Test
-    @Ignore
     public void shouldTestWorkspaceOperationTest_testMove() throws Exception {
         // setup
         String node2 = "node2";
@@ -1653,7 +1602,6 @@
      * @see WorkspaceOperationTest#testRename()
      */
     @Test
-    @Ignore
     public void shouldTestWorkspaceOperationTest_testRename() throws Exception {
         // setup
         Node n1 = getRoot().addNode("node1", UNSTRUCTURED);

Modified: trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java
===================================================================
--- trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java	2009-12-04 06:56:15 UTC (rev 1399)
+++ trunk/dna-jcr/src/test/java/org/jboss/dna/jcr/JcrTckTest.java	2009-12-04 06:56:40 UTC (rev 1400)
@@ -118,7 +118,7 @@
 
         suite.addTest(new LevelOneFeatureTests());
         suite.addTest(new LevelTwoFeatureTests());
-//        suite.addTest(new OptionalFeatureTests());
+        suite.addTest(new OptionalFeatureTests());
 
         return suite;
     }
@@ -282,32 +282,33 @@
             // We currently don't pass the tests in those suites that are commented out
             // See https://jira.jboss.org/jira/browse/DNA-285
 
-            addTest(new ObservationTests()); // remove this and the ObservationTests inner class when all tests pass and uncomment observation.TestAll
-//            addTest(org.apache.jackrabbit.test.api.observation.TestAll.suite());
+            addTest(new ObservationTests()); // remove this and the ObservationTests inner class when all tests pass and uncomment
+            // observation.TestAll
+            // addTest(org.apache.jackrabbit.test.api.observation.TestAll.suite());
             // addTest(org.apache.jackrabbit.test.api.version.TestAll.suite());
             addTest(org.apache.jackrabbit.test.api.lock.TestAll.suite());
-//            addTest(org.apache.jackrabbit.test.api.util.TestAll.suite());
+            // addTest(org.apache.jackrabbit.test.api.util.TestAll.suite());
         }
     }
-    
+
     private static class ObservationTests extends TestSuite {
         protected ObservationTests() {
             super("JCR Observation Tests");
-            
+
             // these are the tests included in observation.TestAll.suite()
             addTestSuite(EventIteratorTest.class);
             addTestSuite(EventTest.class);
             addTestSuite(GetRegisteredEventListenersTest.class);
             addTestSuite(LockingTest.class);
             addTestSuite(NodeAddedTest.class);
-//            addTestSuite(NodeRemovedTest.class);
+            // addTestSuite(NodeRemovedTest.class);
             addTestSuite(NodeMovedTest.class);
             addTestSuite(NodeReorderTest.class);
             addTestSuite(PropertyAddedTest.class);
             addTestSuite(PropertyChangedTest.class);
             addTestSuite(PropertyRemovedTest.class);
-//            addTestSuite(AddEventListenerTest.class);
-//            addTestSuite(WorkspaceOperationTest.class);
+            // addTestSuite(AddEventListenerTest.class);
+            // addTestSuite(WorkspaceOperationTest.class);
         }
     }
 }



More information about the dna-commits mailing list