Update of /var/cvs/tests/bridge/org/mmbase/bridge
In directory james.mmbase.org:/tmp/cvs-serv16370
Modified Files:
TransactionTest.java
Log Message:
trying something else
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.13
retrieving revision 1.14
diff -u -b -r1.13 -r1.14
--- TransactionTest.java 13 Aug 2008 08:38:19 -0000 1.13
+++ TransactionTest.java 1 Oct 2008 17:17:30 -0000 1.14
@@ -19,7 +19,7 @@
* Test class <code>Transaction</code> from the bridge package.
*
* @author Michiel Meeuwissen
- * @version $Id: TransactionTest.java,v 1.13 2008/08/13 08:38:19 michiel Exp $
+ * @version $Id: TransactionTest.java,v 1.14 2008/10/01 17:17:30 michiel Exp $
* @since MMBase-1.8.6
*/
public class TransactionTest extends BridgeTest {
@@ -48,6 +48,7 @@
Node node = cloud.getNodeManager("news").createNode();
node.setStringValue("title", "foo");
node.createAlias("test.news." + seq);
+ node.setContext("default");
node.commit();
newNode2 = node.getNumber();
}
@@ -313,6 +314,30 @@
}
+ public void testGetNodeTwiceWhileChanged() {
+ Cloud cloud1 = getCloud();
+ {
+ Node node = cloud1.getNode(newNode2);
+ String title1 = node.getStringValue("title");
+ node.setStringValue("title", "bla bla");
+ // don't commit
+ }
+ // now change something by someone else
+ {
+ Cloud cloud2 = getCloud("foo");
+ assertTrue(cloud1 != cloud2);
+ Node node = cloud2.getNode(newNode2);
+ node.setStringValue("title", "new title value");
+ node.commit();
+ }
+ // now look to the original cloud
+ {
+ Node node = cloud1.getNode(newNode2);
+ assertEquals("new title value", node.getStringValue("title"));
+ }
+
+ }
+
}
_______________________________________________
Cvs mailing list
[email protected]
http://lists.mmbase.org/mailman/listinfo/cvs