/// If no such lease is present, an exception will be thrown.
virtual void updateLease4(const Lease4Ptr& lease4);
- /// @brief Updates IPv4 lease.
+ /// @brief Updates IPv6 lease.
///
- /// @param lease4 The lease to be updated.
+ /// @param lease6 The lease to be updated.
///
/// @throw isc::dhcp::NoSuchLease Attempt to update a lease that did not
/// exist.
/// failed.
virtual void updateLease6(const Lease6Ptr& lease6);
- /// @brief Deletes a lease.
+ /// @brief Deletes an IPv4 lease.
///
/// @param addr IPv4 address of the lease to be deleted.
///
/// @return true if deletion was successful, false if no such lease exists
virtual bool deleteLease4(const isc::asiolink::IOAddress& addr);
- /// @brief Deletes a lease.
+ /// @brief Deletes an IPv6 lease.
///
- /// @param addr IPv4 address of the lease to be deleted.
+ /// @param addr IPv6 address of the lease to be deleted.
///
/// @return true if deletion was successful, false if no such lease exists
///
L4_ADDRESS(ADDRESS_4), L4_IOADDRESS(L4_ADDRESS),
L5_ADDRESS(ADDRESS_5), L5_IOADDRESS(L5_ADDRESS),
L6_ADDRESS(ADDRESS_6), L6_IOADDRESS(L6_ADDRESS),
- L7_ADDRESS(ADDRESS_7), L7_IOADDRESS(L7_ADDRESS)
- {
+ L7_ADDRESS(ADDRESS_7), L7_IOADDRESS(L7_ADDRESS) {
+
destroySchema();
createSchema();
- LeaseMgrFactory::create(validConnectionString());
+ try {
+ LeaseMgrFactory::create(validConnectionString());
+ } catch (...) {
+ std::cerr << "*** ERROR: unable to open database. The test\n"
+ "*** environment is broken and must be fixed before\n"
+ "*** the MySQL tests will run correctly.\n"
+ "*** The reason for the problem is described in the\n"
+ "*** accompanying exception output.\n";
+ throw;
+ }
lmptr_ = &(LeaseMgrFactory::instance());
}
LeaseMgrFactory::destroy();
} catch (const isc::Exception& ex) {
FAIL() << "*** ERROR: unable to open database, reason:\n"
- << " " << ex.what()
+ << " " << ex.what() << "\n"
<< "*** The test environment is broken and must be fixed\n"
<< "*** before the MySQL tests will run correctly.\n";
}