diff --git a/src/test/java/org/csource/fastdfs/FdfsTest.java b/src/test/java/org/csource/fastdfs/FdfsTest.java index 76645e9..5dae203 100644 --- a/src/test/java/org/csource/fastdfs/FdfsTest.java +++ b/src/test/java/org/csource/fastdfs/FdfsTest.java @@ -36,20 +36,19 @@ public class FdfsTest { storageClient = new StorageClient(trackerServer, storageServer); } -// @After -// public void closeClient() { -// LOGGER.info("close connection"); -// if(trackerServer != null){ -// try { -// trackerServer.close(); -// trackerServer.finalize(); -// }catch (Exception e){ -// e.printStackTrace(); -// }catch (Throwable e){ -// e.printStackTrace(); -// } -// } -// } + @After + public void closeClient() { + LOGGER.info("close connection"); + if(trackerServer != null){ + try { + trackerServer.finalize(); + }catch (Exception e){ + e.printStackTrace(); + }catch (Throwable e){ + e.printStackTrace(); + } + } + } public void writeByteToFile(byte[] fbyte, String fileName) throws IOException { BufferedOutputStream bos = null;