From 10364298844a994f31acb98248450afd973ac5ce Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Wed, 12 Apr 2023 18:13:17 -0400 Subject: [PATCH 1/5] GH-35089: [CI][C++][Flight] Test failures in macos release verification nightlies --- cpp/src/arrow/flight/test_definitions.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cpp/src/arrow/flight/test_definitions.cc b/cpp/src/arrow/flight/test_definitions.cc index 9d08c70df1542..16409f17b46f4 100644 --- a/cpp/src/arrow/flight/test_definitions.cc +++ b/cpp/src/arrow/flight/test_definitions.cc @@ -108,7 +108,15 @@ void ConnectivityTest::TestBrokenConnection() { ASSERT_OK(server->Shutdown()); ASSERT_OK(server->Wait()); +#if defined(__APPLE__) && defined(__x86_64__) + // for some reason, on macos-x86-64 the broken connection here returns + // a different error and we get UnknownError instead of IOError. + // Since we're *testing* the broken connection, we can just check for + // the other error in this case. + ASSERT_RAISES(UnknownError, client->GetFlightInfo(FlightDescriptor::Command(""))); +#else ASSERT_RAISES(IOError, client->GetFlightInfo(FlightDescriptor::Command(""))); +#endif } //------------------------------------------------------------ From 21039ffd15195c81704a383c68d1a64a3031de1a Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Wed, 12 Apr 2023 18:29:37 -0400 Subject: [PATCH 2/5] arm timeout test --- cpp/src/arrow/flight/flight_test.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/cpp/src/arrow/flight/flight_test.cc b/cpp/src/arrow/flight/flight_test.cc index 502a7898401fa..b1956acc0073e 100644 --- a/cpp/src/arrow/flight/flight_test.cc +++ b/cpp/src/arrow/flight/flight_test.cc @@ -1023,7 +1023,11 @@ TEST_F(TestFlightClient, TimeoutFires) { Status status = client->GetFlightInfo(options, FlightDescriptor{}).status(); auto end = std::chrono::system_clock::now(); #ifdef ARROW_WITH_TIMING_TESTS +#ifdef __APPLE__ + EXPECT_LE(end - start, std::chrono::milliseconds{1000}); +#else EXPECT_LE(end - start, std::chrono::milliseconds{400}); +#endif #else ARROW_UNUSED(end - start); #endif From 3ab5a0f52a74f38177eec695f7e9d8b9e7b87622 Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Thu, 13 Apr 2023 14:39:16 -0400 Subject: [PATCH 3/5] pr feedback --- cpp/src/arrow/flight/flight_test.cc | 6 +----- cpp/src/arrow/flight/test_definitions.cc | 12 +++--------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/cpp/src/arrow/flight/flight_test.cc b/cpp/src/arrow/flight/flight_test.cc index b1956acc0073e..5520dfc48f746 100644 --- a/cpp/src/arrow/flight/flight_test.cc +++ b/cpp/src/arrow/flight/flight_test.cc @@ -1023,11 +1023,7 @@ TEST_F(TestFlightClient, TimeoutFires) { Status status = client->GetFlightInfo(options, FlightDescriptor{}).status(); auto end = std::chrono::system_clock::now(); #ifdef ARROW_WITH_TIMING_TESTS -#ifdef __APPLE__ - EXPECT_LE(end - start, std::chrono::milliseconds{1000}); -#else - EXPECT_LE(end - start, std::chrono::milliseconds{400}); -#endif + EXPECT_LE(end - start, std::chrono::milliseconds{1200}); #else ARROW_UNUSED(end - start); #endif diff --git a/cpp/src/arrow/flight/test_definitions.cc b/cpp/src/arrow/flight/test_definitions.cc index 16409f17b46f4..9212cc59860df 100644 --- a/cpp/src/arrow/flight/test_definitions.cc +++ b/cpp/src/arrow/flight/test_definitions.cc @@ -108,15 +108,9 @@ void ConnectivityTest::TestBrokenConnection() { ASSERT_OK(server->Shutdown()); ASSERT_OK(server->Wait()); -#if defined(__APPLE__) && defined(__x86_64__) - // for some reason, on macos-x86-64 the broken connection here returns - // a different error and we get UnknownError instead of IOError. - // Since we're *testing* the broken connection, we can just check for - // the other error in this case. - ASSERT_RAISES(UnknownError, client->GetFlightInfo(FlightDescriptor::Command(""))); -#else - ASSERT_RAISES(IOError, client->GetFlightInfo(FlightDescriptor::Command(""))); -#endif + auto status = client->GetFlightInfo(FlightDescriptor::Command("")); + ASSERT_NOT_OK(status); + ASSERT_THAT(status.status().code(), ::testing::AnyOf(::arrow::StatusCode::IOError, ::arrow::StatusCode::UnknownError)); } //------------------------------------------------------------ From 381a57eadbc09626fdf1990df1361735ce206137 Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Thu, 13 Apr 2023 15:57:38 -0400 Subject: [PATCH 4/5] clang format --- cpp/src/arrow/flight/test_definitions.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cpp/src/arrow/flight/test_definitions.cc b/cpp/src/arrow/flight/test_definitions.cc index 9212cc59860df..507c5ef40421c 100644 --- a/cpp/src/arrow/flight/test_definitions.cc +++ b/cpp/src/arrow/flight/test_definitions.cc @@ -110,7 +110,9 @@ void ConnectivityTest::TestBrokenConnection() { auto status = client->GetFlightInfo(FlightDescriptor::Command("")); ASSERT_NOT_OK(status); - ASSERT_THAT(status.status().code(), ::testing::AnyOf(::arrow::StatusCode::IOError, ::arrow::StatusCode::UnknownError)); + ASSERT_THAT( + status.status().code(), + ::testing::AnyOf(::arrow::StatusCode::IOError, ::arrow::StatusCode::UnknownError)); } //------------------------------------------------------------ From 4ef0c66600496e45662cdef45a007a6b0fa0ce1e Mon Sep 17 00:00:00 2001 From: Matt Topol Date: Fri, 14 Apr 2023 17:52:47 -0400 Subject: [PATCH 5/5] pin v1.50.1 grpc-cpp for conda --- ci/conda_env_cpp.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ci/conda_env_cpp.txt b/ci/conda_env_cpp.txt index 4ca76a7215869..902c952532b62 100644 --- a/ci/conda_env_cpp.txt +++ b/ci/conda_env_cpp.txt @@ -27,7 +27,7 @@ gflags glog gmock>=1.10.0 google-cloud-cpp>=1.34.0 -grpc-cpp +grpc-cpp<=1.50.1 gtest>=1.10.0 libprotobuf libutf8proc