Skip to content

Commit 4357f7f

Browse files
committed
examples: Throw exception in test instead of printStackTrace
Throwing makes cleaner code and also is more helpful if the exception is ever thrown, as the error will be more clear.
1 parent 9e02cf0 commit 4357f7f

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

examples/src/test/java/io/grpc/examples/routeguide/RouteGuideServerTest.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,12 +85,8 @@ public void setUp() throws Exception {
8585
}
8686

8787
@After
88-
public void tearDown() {
89-
try {
90-
server.stop();
91-
} catch (InterruptedException e) {
92-
e.printStackTrace();
93-
}
88+
public void tearDown() throws Exception {
89+
server.stop();
9490
}
9591

9692
@Test

0 commit comments

Comments
 (0)