diff --git a/presto-native-execution/presto_cpp/main/http/tests/HttpTest.cpp b/presto-native-execution/presto_cpp/main/http/tests/HttpTest.cpp index 5e4a1ceddf371..c72617f01dfc0 100644 --- a/presto-native-execution/presto_cpp/main/http/tests/HttpTest.cpp +++ b/presto-native-execution/presto_cpp/main/http/tests/HttpTest.cpp @@ -121,8 +121,8 @@ TEST_P(HttpTestSuite, basic) { auto tryResponse = sendGet(client.get(), "/blackhole").getTry(); ASSERT_TRUE(tryResponse.hasException()); - auto httpException = dynamic_cast( - tryResponse.tryGetExceptionObject()); + auto httpException = + tryResponse.tryGetExceptionObject(); ASSERT_EQ(httpException->getProxygenError(), proxygen::kErrorTimeout); response = sendGet(client.get(), "/ping").get(); @@ -133,8 +133,8 @@ TEST_P(HttpTestSuite, basic) { auto tryResponse = sendGet(client.get(), "/ping").getTry(); ASSERT_TRUE(tryResponse.hasException()); - auto socketException = dynamic_cast( - tryResponse.tryGetExceptionObject()); + auto socketException = + tryResponse.tryGetExceptionObject(); ASSERT_EQ(socketException->getType(), folly::AsyncSocketException::NOT_OPEN); }