You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@curator.apache.org by ra...@apache.org on 2014/05/23 17:07:30 UTC

[29/29] git commit: Leave this tester around for future use

Leave this tester around for future use


Project: http://git-wip-us.apache.org/repos/asf/curator/repo
Commit: http://git-wip-us.apache.org/repos/asf/curator/commit/07db9f6c
Tree: http://git-wip-us.apache.org/repos/asf/curator/tree/07db9f6c
Diff: http://git-wip-us.apache.org/repos/asf/curator/diff/07db9f6c

Branch: refs/heads/CURATOR-105
Commit: 07db9f6c1c4593840cc9ed5188bf520e257d54d6
Parents: 9b9b9ae
Author: randgalt <ra...@apache.org>
Authored: Fri May 23 10:06:50 2014 -0500
Committer: randgalt <ra...@apache.org>
Committed: Fri May 23 10:06:50 2014 -0500

----------------------------------------------------------------------
 .../apache/curator/x/discovery/ServiceCacheLeakTester.java   | 8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/curator/blob/07db9f6c/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/ServiceCacheLeakTester.java
----------------------------------------------------------------------
diff --git a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/ServiceCacheLeakTester.java b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/ServiceCacheLeakTester.java
index b4e08d1..ca3f76a 100644
--- a/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/ServiceCacheLeakTester.java
+++ b/curator-x-discovery/src/test/java/org/apache/curator/x/discovery/ServiceCacheLeakTester.java
@@ -6,12 +6,10 @@ import org.apache.curator.retry.RetryOneTime;
 import org.apache.curator.test.TestingServer;
 import org.apache.curator.utils.CloseableUtils;
 import org.apache.curator.x.discovery.strategies.RandomStrategy;
-import org.testng.annotations.Test;
 
 public class ServiceCacheLeakTester
 {
-    @Test
-    public void serviceCacheInstancesLeaked() throws Exception
+    public static void main(String[] args) throws Exception
     {
         TestingServer testingServer = new TestingServer();
 
@@ -33,7 +31,7 @@ public class ServiceCacheLeakTester
         }
     }
 
-    private void doWork(CuratorFramework curatorFramework) throws Exception
+    private static void doWork(CuratorFramework curatorFramework) throws Exception
     {
         ServiceInstance<Void> thisInstance = ServiceInstance.<Void>builder().name("myservice").build();
         final ServiceDiscovery<Void> serviceDiscovery = ServiceDiscoveryBuilder.builder(Void.class).client(curatorFramework.usingNamespace("dev")).basePath("/instances").thisInstance(thisInstance).build();
@@ -54,7 +52,7 @@ public class ServiceCacheLeakTester
         }
     }
 
-    private ServiceProvider<Void> serviceProvider(ServiceDiscovery<Void> serviceDiscovery, String name) throws Exception
+    private static ServiceProvider<Void> serviceProvider(ServiceDiscovery<Void> serviceDiscovery, String name) throws Exception
     {
         return serviceDiscovery.serviceProviderBuilder().serviceName(name).providerStrategy(new RandomStrategy<Void>()).build();
     }