Update of /var/cvs/tests/bridge/org/mmbase/bridge
In directory james.mmbase.org:/tmp/cvs-serv11162

Modified Files:
        TransactionTest.java 
Log Message:
 I fixed one variant of the failing test-case, but come up with a scenario 
which would still go wrong


See also: http://cvs.mmbase.org/viewcvs/tests/bridge/org/mmbase/bridge


Index: TransactionTest.java
===================================================================
RCS file: /var/cvs/tests/bridge/org/mmbase/bridge/TransactionTest.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- TransactionTest.java        15 Jul 2008 22:08:49 -0000      1.10
+++ TransactionTest.java        22 Jul 2008 05:34:14 -0000      1.11
@@ -19,7 +19,7 @@
  * Test class <code>Transaction</code> from the bridge package.
  *
  * @author Michiel Meeuwissen
- * @version $Id: TransactionTest.java,v 1.10 2008/07/15 22:08:49 michiel Exp $
+ * @version $Id: TransactionTest.java,v 1.11 2008/07/22 05:34:14 michiel Exp $
  * @since MMBase-1.8.6
   */
 public class TransactionTest extends BridgeTest {
@@ -245,6 +245,30 @@
         assertTrue(cloud.hasNode(newNode2));
     }
 
+    // same case as above, only no changes are made to the node.
+    public void 
testDeleteNodeOutsideTransactionNodeInTransactionButNotChanged() {
+        Cloud cloud = getCloud();
+        Transaction t = cloud.getTransaction("bar11");
+        Node nodeInTransaction = t.getNode(newNode2);
+        //nodeInTransaction.setStringValue("title", "foo2");
+        {
+            // now delete the node
+            Node nodeOutTransaction = cloud.getNode(newNode2);
+            nodeOutTransaction.delete();
+            assertFalse(cloud.hasNode(newNode2));
+        }
+
+        try {
+            t.commit();
+        } catch (Exception e) {
+            // should not give exception. MMB-1680
+            log.error(e.getMessage(), e);
+            fail(e.getMessage());
+        }
+
+        assertTrue(cloud.hasNode(newNode2));
+    }
+
 
 
 
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs

Reply via email to