diff --git a/src/test_api.cpp b/src/test_api.cpp index 1779ced..dc8cd98 100644 --- a/src/test_api.cpp +++ b/src/test_api.cpp @@ -4,7 +4,6 @@ #include #include -#include #include #include #include @@ -17,7 +16,7 @@ class TestThread { {{ "jsonrpc": "2.0", "method": "{}", - "params": {{}}, + "params": {{}}, "id": 1 }} )", @@ -48,9 +47,8 @@ class TestThread { } if (state.load() && calls_queue.empty()) - cv.wait_for(lock, thr_sleep, [&] { - return stoken.stop_requested(); - }); + cv.wait_for(lock, thr_sleep, + [&] { return stoken.stop_requested(); }); lock.unlock(); } @@ -138,8 +136,10 @@ class TestThread { extern "C" { void crpc_test_init() { - if (!google::IsGoogleLoggingInitialized()) + if (!google::IsGoogleLoggingInitialized()) { google::InitGoogleLogging("TestRPC"); + google::LogToStderr(); + } try { test.start(); } catch (const std::exception &e) { @@ -171,4 +171,4 @@ void crpc_test_schedule_call(rpc_string *name) { test.add_queue_call(name->s); } void crpc_test_auto_call(uint32_t state) { test.auto_call(static_cast(state)); } -} \ No newline at end of file +}