Imported Upstream version 1.34.0
[platform/upstream/grpc.git] / test / cpp / end2end / filter_end2end_test.cc
index 062a47a..6287677 100644 (file)
@@ -34,6 +34,8 @@
 #include <grpcpp/support/config.h>
 #include <grpcpp/support/slice.h>
 
+#include "absl/memory/memory.h"
+
 #include "src/cpp/common/channel_filter.h"
 #include "src/proto/grpc/testing/echo.grpc.pb.h"
 #include "test/core/util/port.h"
@@ -44,7 +46,6 @@
 
 using grpc::testing::EchoRequest;
 using grpc::testing::EchoResponse;
-using std::chrono::system_clock;
 
 namespace grpc {
 namespace testing {
@@ -101,7 +102,7 @@ int GetCallCounterValue() {
 class ChannelDataImpl : public ChannelData {
  public:
   grpc_error* Init(grpc_channel_element* /*elem*/,
-                   grpc_channel_element_args* /*args*/) {
+                   grpc_channel_element_args* /*args*/) override {
     IncrementConnectionCounter();
     return GRPC_ERROR_NONE;
   }
@@ -151,16 +152,16 @@ class FilterEnd2endTest : public ::testing::Test {
     bool ignored_ok;
     cli_cq_.Shutdown();
     srv_cq_->Shutdown();
-    while (cli_cq_.Next(&ignored_tag, &ignored_ok))
-      ;
-    while (srv_cq_->Next(&ignored_tag, &ignored_ok))
-      ;
+    while (cli_cq_.Next(&ignored_tag, &ignored_ok)) {
+    }
+    while (srv_cq_->Next(&ignored_tag, &ignored_ok)) {
+    }
   }
 
   void ResetStub() {
     std::shared_ptr<Channel> channel = grpc::CreateChannel(
         server_address_.str(), InsecureChannelCredentials());
-    generic_stub_.reset(new GenericStub(channel));
+    generic_stub_ = absl::make_unique<GenericStub>(channel);
     ResetConnectionCounter();
     ResetCallCounter();
   }