summaryrefslogtreecommitdiff
path: root/cpp/test/Freeze/dbmap/Client.cpp
diff options
context:
space:
mode:
authorDwayne Boone <dwayne@zeroc.com>2007-08-24 11:28:20 -0400
committerDwayne Boone <dwayne@zeroc.com>2007-08-24 11:28:20 -0400
commit9a07052d6711858507faa27ff736d4520b3163e9 (patch)
tree7fa0a0406be0386a8314b2e8c742f29bf127b70d /cpp/test/Freeze/dbmap/Client.cpp
parentMerge branch 'master' of ssh://cvs.zeroc.com/home/git/ice (diff)
parentSquashed commit of the following: (diff)
downloadice-9a07052d6711858507faa27ff736d4520b3163e9.tar.bz2
ice-9a07052d6711858507faa27ff736d4520b3163e9.tar.xz
ice-9a07052d6711858507faa27ff736d4520b3163e9.zip
Merge branch 'master' of ssh://cvs.zeroc.com/home/git/ice
Diffstat (limited to 'cpp/test/Freeze/dbmap/Client.cpp')
-rw-r--r--cpp/test/Freeze/dbmap/Client.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/cpp/test/Freeze/dbmap/Client.cpp b/cpp/test/Freeze/dbmap/Client.cpp
index aeefc3a2133..17af3c7120b 100644
--- a/cpp/test/Freeze/dbmap/Client.cpp
+++ b/cpp/test/Freeze/dbmap/Client.cpp
@@ -584,6 +584,31 @@ run(const CommunicatorPtr& communicator, const string& envName)
test(count == 4);
cout << "ok " << endl;
+ cout << "Testing unreferenced connection+transaction... " << flush;
+ {
+ Freeze::ConnectionPtr c2 = createConnection(communicator, envName);
+ ByteIntMap m2(c2, dbName);
+
+ TransactionPtr tx = c2->beginTransaction();
+
+ p = m2.findByValue(17);
+ test(p != m2.end());
+
+ m2.put(ByteIntMap::value_type(alphabet[21], static_cast<Int>(99)));
+
+ p = m2.findByValue(17);
+ test(p == m2.end());
+
+ test(c2->currentTransaction() != 0);
+ test(tx->getConnection() != 0);
+ }
+ //
+ // Should roll back here
+ //
+ p = m.findByValue(17);
+ test(p != m.end());
+ cout << "ok " << endl;
+
cout << "testing concurrent access... " << flush;
m.clear();
populateDB(connection, m);
@@ -602,6 +627,7 @@ run(const CommunicatorPtr& communicator, const string& envName)
}
cout << "ok" << endl;
+
cout << "testing index creation... " << flush;
{