diff options
author | Bernard Normier <bernard@zeroc.com> | 2007-08-23 14:56:08 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2007-08-23 14:56:08 -0400 |
commit | 0664ab6ebfe794441a5d2f15507f449231384c85 (patch) | |
tree | 7df11c9a0d891c62cb284b62e1416b2742788ee2 /cpp/test/Freeze/dbmap/Client.cpp | |
parent | http://bugzilla.zeroc.com/bugzilla/show_bug.cgi?id=2426 - logger date/time fo... (diff) | |
download | ice-0664ab6ebfe794441a5d2f15507f449231384c85.tar.bz2 ice-0664ab6ebfe794441a5d2f15507f449231384c85.tar.xz ice-0664ab6ebfe794441a5d2f15507f449231384c85.zip |
Fixed bug #2233
Diffstat (limited to 'cpp/test/Freeze/dbmap/Client.cpp')
-rw-r--r-- | cpp/test/Freeze/dbmap/Client.cpp | 26 |
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; { |