Remove the resolv_integration_test check whether fd is closed or not
The check is not thread-safe. It sometimes results in the tests flaky
because the fd gets reused in another thread as soon as it is closed.
Bug: 156755788
Test: Run resolv_integration_test
Change-Id: I5730fc993eb47cd3e54add3f8102eb68d812507c
diff --git a/tests/resolv_integration_test.cpp b/tests/resolv_integration_test.cpp
index 7c3fcb0..5d41a8a 100644
--- a/tests/resolv_integration_test.cpp
+++ b/tests/resolv_integration_test.cpp
@@ -2105,12 +2105,7 @@
ret = poll(wait_fd, 1, -1);
revents = wait_fd[0].revents;
if (revents & POLLIN) {
- int n = resNetworkResult(fd, rcode, buf, bufLen);
- // Verify that resNetworkResult() closed the fd
- char unused;
- EXPECT_EQ(-1, read(fd, &unused, sizeof unused));
- EXPECT_EQ(EBADF, errno);
- return n;
+ return resNetworkResult(fd, rcode, buf, bufLen);
}
return -1;
}