diff options
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; { |