Skip to content

Commit

Permalink
pr feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
zeroshade committed Apr 13, 2023
1 parent 21039ff commit 3ab5a0f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 14 deletions.
6 changes: 1 addition & 5 deletions cpp/src/arrow/flight/flight_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 3 additions & 9 deletions cpp/src/arrow/flight/test_definitions.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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));
}

//------------------------------------------------------------
Expand Down

0 comments on commit 3ab5a0f

Please sign in to comment.