Skip to content

Commit 9158396

Browse files
HannahShiSFBcopybara-github
authored andcommitted
[ObjC] Deflak cf stream endpoint connect timeout cancel tests (grpc#39494)
To test connection timeout or cancel, it needs a routable address that the test cannot connect. Previously used IP started behave weirdly (after the mac environment update?) causing those tests to fail with unknown error, this PR uses a well know IP but a unreachable port for test. A few other PRs are opened to verify it's not flaky anymore but test results are cached, tried kokoro force run and using different base but it's hard to tell as they don't necessarily fail without the fix. For the EINTR error, retry should not be needed in real world as the [cf network stack](https://github.com/opensource-apple/CF/blob/master/CFSocket.c#L66) is already doing this. The old cfstream implementation for iomgr wasn't doing retry either. Closes grpc#39494 COPYBARA_INTEGRATE_REVIEW=grpc#39494 from HannahShiSFB:flaky-cf-stream-endpoint-connect-timeout-deadline-tests2 73e7813 PiperOrigin-RevId: 756025684
1 parent 08fa152 commit 9158396

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/core/event_engine/cf/cf_engine_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ namespace experimental {
4040

4141
TEST(CFEventEngineTest, TestConnectionTimeout) {
4242
// use a non-routable IP so connection will timeout
43-
auto resolved_addr = URIToResolvedAddress("ipv4:10.255.255.255:1234");
43+
auto resolved_addr = URIToResolvedAddress("ipv4:8.8.8.8:1234");
4444
CHECK_OK(resolved_addr);
4545

4646
grpc_core::MemoryQuota memory_quota("cf_engine_test");
@@ -63,7 +63,7 @@ TEST(CFEventEngineTest, TestConnectionTimeout) {
6363

6464
TEST(CFEventEngineTest, TestConnectionCancelled) {
6565
// use a non-routable IP so to cancel connection before timeout
66-
auto resolved_addr = URIToResolvedAddress("ipv4:10.255.255.255:1234");
66+
auto resolved_addr = URIToResolvedAddress("ipv4:8.8.8.8:1234");
6767
CHECK_OK(resolved_addr);
6868

6969
grpc_core::MemoryQuota memory_quota("cf_engine_test");

0 commit comments

Comments
 (0)