functioner commented on pull request #3719: URL: https://github.com/apache/hadoop/pull/3719#issuecomment-985853038
@virajjasani I've pushed a commit for the unit test `testIOEOnListenerAccept`. I've confirmed that it can pass only if we have this patch. The inspiration comes from `hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java`. I leverage some existing scaffolds in `TestIPC.java`: https://github.com/apache/hadoop/blob/c0f405a46b402b4bdf5b7771f5124790fc866965/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java#L487-L532 https://github.com/apache/hadoop/blob/c0f405a46b402b4bdf5b7771f5124790fc866965/hadoop-common-project/hadoop-common/src/test/java/org/apache/hadoop/ipc/TestIPC.java#L420-L425 Then I just override some methods of `TestServer` and `Server$Listener` to inject the IOException. In `testIOEOnListenerAccept`, the first client call encounters the injection in server and thus gets its socket closed. Hence we expect `EOFException`. The second client call should work normally. Any comment or suggestion? Thank you! -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
