tensorflow/core/distributed_runtime/recent_request_ids_test.cc
// Check that the oldest request_id is evicted.
Check that the oldest request_id is evicted.
Check that the oldest request_id is evicted .
void TestOrdered(int num_request_ids) {
  RecentRequestIds recent_request_ids(num_request_ids);
  for (int i = 1; i < 101; ++i) {
    TF_EXPECT_OK(TrackUnique(i, &recent_request_ids));
    for (int j = std::max(1, i - num_request_ids + 1); j <= i; ++j) {
      EXPECT_FALSE(TrackUnique(j, &recent_request_ids).ok())
          << "i=" << i << " j=" << j;
    }
  }
}
void TestOrdered ( int num_request_ids ) { RecentRequestIds recent_request_ids ( num_request_ids ) ; for ( int i = 1 ; i < 101 ; ++ i ) { TF_EXPECT_OK ( TrackUnique ( i , & recent_request_ids ) ) ; for ( int j = std :: max ( 1 , i - num_request_ids + 1 ) ; j <= i ; ++ j ) { EXPECT_FALSE ( TrackUnique ( j , & recent_request_ids ) . ok ( ) ) << " " << i << " " << j ; } } }
Check that the oldest request_id is evicted.
Check that the oldest request_id is evicted .
// Insert [1..101). The current number and the (num_request_ids - 1) preceding // numbers should still be in the set.