fix flaky ConnectTFOTimeout and ConnectTFOFallbackTimeout tests
[folly.git] / folly / test / TimeseriesHistogramTest.cpp
index e106e88134f848bdb27d3d4763ca0a35366c12b3..489c277d0db66a67c9c768570459b30ed383cd25 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright 2014 Facebook, Inc.
+ * Copyright 2016 Facebook, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -17,6 +17,8 @@
 #include <folly/stats/TimeseriesHistogram.h>
 #include <folly/stats/TimeseriesHistogram-defs.h>
 
+#include <random>
+
 #include <gtest/gtest.h>
 
 using namespace std;
@@ -428,7 +430,6 @@ TEST(TimeseriesHistogram, QueryByInterval) {
 
   for (int i = 0; i < 12; i++) {
     const auto& itv = intervals[i];
-    int c = mhts.count(itv.start, itv.end);
     // Some of the older intervals that fall in the alltime bucket
     // are off by 1 or 2 in their estimated counts.
     size_t tolerance = 0;
@@ -484,4 +485,3 @@ TEST(TimeseriesHistogram, SingleUniqueValue) {
     }
   }
 }
-