Skip to content

Commit

Permalink
add close in test (#282)
Browse files Browse the repository at this point in the history
  • Loading branch information
laura-ding authored Mar 26, 2021
1 parent 9531f4a commit 55dd09a
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ public static void initGraph() {
| IOErrorException | AuthFailedException
| UnsupportedEncodingException e) {
e.printStackTrace();
} finally {
pool.close();
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,14 @@
import java.io.UnsupportedEncodingException;
import java.util.Arrays;
import java.util.List;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class StorageClientTest {

private final String ip = "127.0.0.1";
private StorageClient client;
private StorageClient client = null;

@Before
public void before() {
Expand All @@ -39,6 +40,12 @@ public void before() {
client = new StorageClient(address);
}

@After
public void after() {
if (client != null) {
client.close();
}
}

@Test
public void testScanVertexWithNoCol() {
Expand Down

0 comments on commit 55dd09a

Please sign in to comment.