Skip to content

Commit 3f7480c

Browse files
committed
test(storage): deflake "plenty clients" tests
These tests are looking for leaks, but were failing when the number of file descriptors *decreased*, they should only fail if they increased.
1 parent 3324787 commit 3f7480c

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

google/cloud/storage/tests/object_plenty_clients_serially_integration_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ TEST_F(ObjectPlentyClientsSeriallyIntegrationTest, PlentyClientsSerially) {
8585
if (track_open_files) {
8686
auto num_fds_after_test = GetNumOpenFiles();
8787
ASSERT_STATUS_OK(num_fds_after_test);
88-
EXPECT_EQ(*num_fds_before_test, *num_fds_after_test)
88+
EXPECT_GE(*num_fds_before_test, *num_fds_after_test)
8989
<< "Clients are leaking descriptors";
9090
}
9191
}

google/cloud/storage/tests/object_plenty_clients_simultaneously_integration_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ TEST_F(ObjectPlentyClientsSimultaneouslyIntegrationTest,
7979
<< "Clients keeps at least some file descriptors open";
8080
EXPECT_LT(*num_fds_after_test, *num_fds_during_test)
8181
<< "Releasing clients also releases at least some file descriptors";
82-
EXPECT_EQ(*num_fds_before_test, *num_fds_after_test)
82+
EXPECT_GE(*num_fds_before_test, *num_fds_after_test)
8383
<< "Clients are leaking descriptors";
8484
} else {
8585
EXPECT_EQ(StatusCode::kUnimplemented, num_fds_before_test.status().code());

0 commit comments

Comments
 (0)