Skip to content

Commit

Permalink
Close rpc client after use it
Browse files Browse the repository at this point in the history
  • Loading branch information
luxiaoxun committed Oct 30, 2016
1 parent 1ca62ae commit 6f361bc
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/test/java/com/nettyrpc/test/app/HelloServiceTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import com.nettyrpc.test.client.HelloPersonService;
import com.nettyrpc.test.client.HelloService;
import com.nettyrpc.test.client.Person;
import org.junit.After;
import org.junit.Assert;
import org.junit.Test;
import org.junit.runner.RunWith;
Expand Down Expand Up @@ -89,4 +90,12 @@ public void helloPersonFutureTest1() throws ExecutionException, InterruptedExcep
System.out.println(persons.get(i));
}
}

@After
public void setTear(){
if(rpcClient != null) {
rpcClient.stop();
}
}

}

0 comments on commit 6f361bc

Please sign in to comment.