diff --git a/pom.xml b/pom.xml index 7485dc4..cfe3f56 100644 --- a/pom.xml +++ b/pom.xml @@ -37,7 +37,7 @@ org.apache.maven.plugins maven-compiler-plugin - 3.5.1 + UTF-8 ${jdk.version} diff --git a/src/main/java/org/csource/fastdfs/StorageClient.java b/src/main/java/org/csource/fastdfs/StorageClient.java index ec4cb7b..9d5c3fa 100644 --- a/src/main/java/org/csource/fastdfs/StorageClient.java +++ b/src/main/java/org/csource/fastdfs/StorageClient.java @@ -28,6 +28,8 @@ public class StorageClient { protected StorageServer storageServer; protected byte errno; + + /** * constructor using global settings in class ClientGlobal */ @@ -1760,6 +1762,22 @@ public class StorageClient { trackerServer.close(); } + public TrackerServer getTrackerServer() { + return trackerServer; + } + + public void setTrackerServer(TrackerServer trackerServer) { + this.trackerServer = trackerServer; + } + + public StorageServer getStorageServer() { + return storageServer; + } + + public void setStorageServer(StorageServer storageServer) { + this.storageServer = storageServer; + } + /** * Upload file by file buff * diff --git a/src/test/java/org/csource/fastdfs/FdfsTest.java b/src/test/java/org/csource/fastdfs/FdfsTest.java index 5dae203..2893114 100644 --- a/src/test/java/org/csource/fastdfs/FdfsTest.java +++ b/src/test/java/org/csource/fastdfs/FdfsTest.java @@ -39,9 +39,9 @@ public class FdfsTest { @After public void closeClient() { LOGGER.info("close connection"); - if(trackerServer != null){ + if(storageClient != null){ try { - trackerServer.finalize(); + storageClient.close(); }catch (Exception e){ e.printStackTrace(); }catch (Throwable e){