Attila Bukor has posted comments on this change. ( http://gerrit.cloudera.org:8080/9818 )
Change subject: KUDU-2351 Add IP/port for Recv() failure ...................................................................... Patch Set 10: (1 comment) http://gerrit.cloudera.org:8080/#/c/9818/10/src/kudu/util/net/socket-test.cc File src/kudu/util/net/socket-test.cc: http://gerrit.cloudera.org:8080/#/c/9818/10/src/kudu/util/net/socket-test.cc@98 PS10, Line 98: TEST_F(SocketTest, TestRecvReset) { : DoTest(false, "recv error from 127.0.0.1:[0-9]+: Resource temporarily unavailable"); : } > I'm not 100% sure what this test is meant to test. It seems this is testing I just needed to test the other code path as well. The problem is that if the connection is closed, it won't get you the actual IP address/port as there's no actual remote yet(so it logs out 0.0.0.0:0). I believe this shouldn't be a problem normally, as if it's a connection refused, it will be logged out somewhere else instead, but in the test I needed to open a connection and close it in a way that would result in a non-EOF error. I thought sending a RST instead, but for that I would need to get the actual C-level socket from the wrapper and send it there, so the time out was easier. It might be a bit hacky, do you have another idea how to test it or should I put some comments explaining why it works this way? -- To view, visit http://gerrit.cloudera.org:8080/9818 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I22436b13bb351b132e1c0b7159294dd0c980c2b3 Gerrit-Change-Number: 9818 Gerrit-PatchSet: 10 Gerrit-Owner: Attila Bukor <[email protected]> Gerrit-Reviewer: Attila Bukor <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Tidy Bot Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Comment-Date: Thu, 05 Apr 2018 16:12:16 +0000 Gerrit-HasComments: Yes
