url = iURL;
}
@Test
public void testTransactionAtomic() throws IOException {
ODatabaseFlat db1 = new ODatabaseFlat(url);
db1.open("admin", "admin");
ODatabaseFlat db2 = new ODatabaseFlat(url);
db2.open("admin", "admin");
ORecordFlat record1 = new ORecordFlat(db1);
record1.value("This is the first version").save();
// RE-READ THE RECORD
record1.reload();
ORecordFlat record2 = db2.load(record1.getIdentity());
record2.value("This is the second version").save();
record2.value("This is the third version").save();
record1.reload(null, true);
Assert.assertEquals(record1.value(), "This is the third version");
db1.close();
db2.close();
}