Skip to content

Commit

Permalink
fix warings
Browse files Browse the repository at this point in the history
  • Loading branch information
cyyever committed Jan 22, 2019
1 parent f6460fa commit f7a4ead
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/cpp/test/concurrency/TimerManagerTests.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class TimerManagerTests {
public:
class Task : public Runnable {
public:
Task(Monitor& monitor, int64_t timeout)
Task(Monitor& monitor, uint64_t timeout)
: _timeout(timeout),
_startTime(std::chrono::duration_cast<std::chrono::milliseconds>(std::chrono::steady_clock::now().time_since_epoch()).count()),
_endTime(0),
Expand Down Expand Up @@ -72,7 +72,7 @@ class TimerManagerTests {
* properly clean up itself and the remaining orphaned timeout task when the
* manager goes out of scope and its destructor is called.
*/
bool test00(int64_t timeout = 1000LL) {
bool test00(uint64_t timeout = 1000LL) {

shared_ptr<TimerManagerTests::Task> orphanTask
= shared_ptr<TimerManagerTests::Task>(new TimerManagerTests::Task(_monitor, 10 * timeout));
Expand All @@ -94,7 +94,7 @@ class TimerManagerTests {
Synchronized s(_monitor);
timerManager.add(orphanTask, 10 * timeout);

THRIFT_SLEEP_USEC(timeout * 1000);
std::this_thread::sleep_for(std::chrono::milliseconds(timeout));

task.reset(new TimerManagerTests::Task(_monitor, timeout));
timerManager.add(task, timeout);
Expand Down Expand Up @@ -122,7 +122,7 @@ class TimerManagerTests {
* verifies that the timer manager properly clean up itself and the remaining orphaned timeout
* task when the manager goes out of scope and its destructor is called.
*/
bool test01(int64_t timeout = 1000LL) {
bool test01(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
Expand Down Expand Up @@ -155,7 +155,7 @@ class TimerManagerTests {
* clean up itself and the remaining orphaned timeout task when the manager goes out of scope
* and its destructor is called.
*/
bool test02(int64_t timeout = 1000LL) {
bool test02(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
Expand Down Expand Up @@ -188,7 +188,7 @@ class TimerManagerTests {
* verifies that the timer manager properly clean up itself and the remaining orphaned timeout
* task when the manager goes out of scope and its destructor is called.
*/
bool test03(int64_t timeout = 1000LL) {
bool test03(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
Expand Down Expand Up @@ -225,7 +225,7 @@ class TimerManagerTests {
/**
* This test creates one tasks, and tries to remove it after it has expired.
*/
bool test04(int64_t timeout = 1000LL) {
bool test04(uint64_t timeout = 1000LL) {
TimerManager timerManager;
timerManager.threadFactory(shared_ptr<ThreadFactory>(new ThreadFactory()));
timerManager.start();
Expand Down

0 comments on commit f7a4ead

Please sign in to comment.