Commit ce492ecf authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner
Browse files

[2378] Fix ZoneLoader after merge

There were some small changes in the behaviour of MasterLoader as a
result of review, this is update do ZoneLoader and its tests to
incorporate that.
parent fd3ff10f
......@@ -327,8 +327,6 @@ TEST_F(ZoneLoaderTest, loadUnsignedIncremental) {
// Not committed yet, we didn't complete the loading
EXPECT_FALSE(destination_client_.commit_called_);
// This is unusual, but allowed. Check it doesn't do anything
loader.loadIncremental(0);
EXPECT_EQ(10, destination_client_.rrsets_.size());
EXPECT_FALSE(destination_client_.commit_called_);
......
......@@ -110,7 +110,11 @@ ZoneLoader::loadIncremental(size_t limit) {
if (iterator_ == ZoneIteratorPtr()) {
assert(loader_.get() != NULL);
complete_ = loader_->loadIncremental(limit);
try {
complete_ = loader_->loadIncremental(limit);
} catch (const isc::dns::MasterLoaderError& e) {
isc_throw(MasterFileError, e.getMessage().c_str());
}
if (complete_ && !loaded_ok_) {
isc_throw(MasterFileError, "Error while loading master file");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment