Commit 744fe91a authored by zhanglikun's avatar zhanglikun
Browse files

[trac598_new] Fix the segmentation fault error in the unittest of ForwardQuery.

parent 32872f1e
......@@ -824,7 +824,8 @@ public:
query_timeout_(query_timeout),
client_timer(io.get_io_service()),
lookup_timer(io.get_io_service()),
outstanding_events_(0)
outstanding_events_(0),
callback_called_(false)
{
// Setup the timer to stop trying (lookup_timeout)
if (lookup_timeout >= 0) {
......
......@@ -748,7 +748,7 @@ TEST_F(RecursiveQueryTest, forwardClientTimeout) {
query.forward(ConstMessagePtr(&query_message), answer, buffer, &server, callback);
// Run the test
io_service_->run();
EXPECT_EQ(callback->result, MockResolverCallback::SUCCESS);
EXPECT_EQ(callback->result, MockResolverCallback::FAILURE);
}
// If we set lookup timeout to lower than querytimeout, the lookup
......
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