From: JINMEI Tatuya Date: Sat, 25 Aug 2012 00:25:48 +0000 (-0700) Subject: [2216] updated data source configuration using the new API X-Git-Tag: trac2351_base~115^2~1 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=34565a28dd40ff2d7bd104feda5c69ba4628dbda;p=thirdparty%2Fkea.git [2216] updated data source configuration using the new API --- diff --git a/src/bin/auth/benchmarks/query_bench.cc b/src/bin/auth/benchmarks/query_bench.cc index 42556ebadf..391866bb1f 100644 --- a/src/bin/auth/benchmarks/query_bench.cc +++ b/src/bin/auth/benchmarks/query_bench.cc @@ -30,6 +30,7 @@ #include #include +#include #include #include @@ -124,8 +125,13 @@ public: OutputBuffer& buffer) : QueryBenchMark(queries, query_message, buffer) { - server_->updateConfig(Element::fromJSON("{\"database_file\": \"" + - string(datasrc_file) + "\"}")); + DataSourceConfigurator::testReconfigure( + server_.get(), + Element::fromJSON("{\"IN\":" + " [{\"type\": \"sqlite3\"," + " \"params\": {" + " \"database_file\": \"" + + string(datasrc_file) + "\"}}]}")); } }; @@ -138,14 +144,14 @@ public: OutputBuffer& buffer) : QueryBenchMark(queries, query_message, buffer) { - configureAuthServer(*server_, - Element::fromJSON( - "{\"datasources\": " - " [{\"type\": \"memory\"," - " \"zones\": [{\"origin\": \"" + - string(zone_origin) + "\"," - " \"file\": \"" + - string(zone_file) + "\"}]}]}")); + DataSourceConfigurator::testReconfigure( + server_.get(), + Element::fromJSON("{\"IN\":" + " [{\"type\": \"MasterFiles\"," + " \"cache-enable\": true, " + " \"params\": {\"" + + string(zone_origin) + "\": \"" + + string(zone_file) + "\"}}]}")); } };