@@ -27,6 +27,7 @@ namespace rebootbackend {
27
27
#define ONE_SECOND_MS (1000 )
28
28
#define FIFTEEN_HUNDRED_MS (1500 )
29
29
#define TWO_SECONDS_MS (2000 )
30
+ #define SELECT_TIMEOUT_250_MS (250 )
30
31
31
32
namespace gpu = ::google::protobuf::util;
32
33
using namespace gnoi ::system;
@@ -75,20 +76,6 @@ class RebootBETestWithoutStop : public ::testing::Test {
75
76
}
76
77
virtual ~RebootBETestWithoutStop () = default ;
77
78
78
- gnoi::system::RebootStatusResponse default_not_started_status () {
79
- InitThreadStatus status;
80
- return status.get_response ();
81
- }
82
-
83
- gnoi::system::RebootStatusResponse default_done_status () {
84
- InitThreadStatus status;
85
- // We can't edit the status without it being active.
86
- status.set_start_status ();
87
- status.set_success ();
88
- status.set_inactive ();
89
- return status.get_response ();
90
- }
91
-
92
79
93
80
void start_rebootbe () {
94
81
m_rebootbe_thread =
@@ -102,11 +89,11 @@ class RebootBETestWithoutStop : public ::testing::Test {
102
89
}
103
90
104
91
void overwrite_reboot_timeout (uint32_t timeout_seconds) {
105
- m_rebootbe.m_reboot_thread .m_reboot_timeout = timeout_seconds;
92
+ m_rebootbe.m_RebootThread .m_reboot_timeout = timeout_seconds;
106
93
}
107
94
108
95
109
- void send_stop_reboot_thread () { m_rebootbe.m_reboot_thread .Stop (); }
96
+ void send_stop_reboot_thread () { m_rebootbe.m_RebootThread .Stop (); }
110
97
111
98
void SendRebootRequest (const std::string &op, const std::string &data,
112
99
const std::string &field, const std::string &value) {
@@ -188,7 +175,7 @@ class RebootBETestWithoutStop : public ::testing::Test {
188
175
}
189
176
190
177
NotificationResponse handle_reboot_request (std::string &json_request) {
191
- return m_rebootbe.handle_reboot_request (json_request);
178
+ return m_rebootbe.HandleRebootRequest (json_request);
192
179
}
193
180
194
181
0 commit comments