colinmjj commented on a change in pull request #25759: [SPARK-19147][CORE]
Gracefully handle error in task after executor is stopped
URL: https://github.com/apache/spark/pull/25759#discussion_r325683083
##########
File path:
common/network-common/src/test/java/org/apache/spark/network/TransportClientFactorySuite.java
##########
@@ -217,4 +217,16 @@ public String get(String name) {
assertFalse(c1.isActive());
}
}
+
+ @Test
+ public void closeFactoryBeforeCreateClient() {
+ TransportClientFactory factory = context.createClientFactory();
+ factory.close();
+ try {
+ // NullPointerException occurred if factory.createClient() after
factory.close()
+ factory.createClient(TestUtils.getLocalHost(), server1.getPort());
+ } catch (Exception e) {
Review comment:
The test shows exception is occurred if
TransportClientFactory.createClient() called after
TransportClientFactory.close().
Agree to throw a better exception and the patch is updated. There should be
an IOException now.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]