diff --git a/test/org/redkale/test/sncp/SncpTest.java b/test/org/redkale/test/sncp/SncpTest.java index 760c0bd45..b029a2bef 100644 --- a/test/org/redkale/test/sncp/SncpTest.java +++ b/test/org/redkale/test/sncp/SncpTest.java @@ -149,6 +149,7 @@ public class SncpTest { { setName("Thread-Server-01"); } + @Override public void run() { try { @@ -157,7 +158,7 @@ public class SncpTest { if (port2 > 0) set.add(new InetSocketAddress(myhost, port2)); //String name, WatchFactory, ObjectPool, AsynchronousChannelGroup, InetSocketAddress clientAddress, Collection final Transport transport = new Transport("", WatchFactory.root(), newBufferPool(), newChannelGroup(), null, set); - SncpTestService service = Sncp.createLocalService("", null, SncpTestService.class, addr, transport, null); + SncpTestService service = Sncp.createLocalService("", null, ResourceFactory.root(), SncpTestService.class, addr, transport, null); ResourceFactory.root().inject(service); server.addService(new ServiceWrapper(SncpTestService.class, service, "", "", new HashSet<>(), null)); System.out.println(service); @@ -182,6 +183,7 @@ public class SncpTest { { setName("Thread-Server-02"); } + @Override public void run() { try { @@ -190,7 +192,7 @@ public class SncpTest { set.add(new InetSocketAddress(myhost, port)); //String name, WatchFactory, ObjectPool, AsynchronousChannelGroup, InetSocketAddress clientAddress, Collection final Transport transport = new Transport("", WatchFactory.root(), newBufferPool(), newChannelGroup(), null, set); - Service service = Sncp.createLocalService("", null, SncpTestService.class, addr, transport, null); + Service service = Sncp.createLocalService("", null, ResourceFactory.root(), SncpTestService.class, addr, transport, null); server.addService(new ServiceWrapper(SncpTestService.class, service, "", "", new HashSet<>(), null)); AnyValue.DefaultAnyValue conf = new AnyValue.DefaultAnyValue(); conf.addValue("host", "0.0.0.0"); diff --git a/test/org/redkale/test/sncp/SncpTestService.java b/test/org/redkale/test/sncp/SncpTestService.java index febc320c9..260118d92 100644 --- a/test/org/redkale/test/sncp/SncpTestService.java +++ b/test/org/redkale/test/sncp/SncpTestService.java @@ -70,7 +70,7 @@ public class SncpTestService implements SncpTestIService { } public static void main(String[] args) throws Exception { - Service service = Sncp.createLocalService("", null, SncpTestService.class, new InetSocketAddress("127.0.0.1", 7070), null, null); + Service service = Sncp.createLocalService("", null, ResourceFactory.root(), SncpTestService.class, new InetSocketAddress("127.0.0.1", 7070), null, null); for (Method method : service.getClass().getDeclaredMethods()) { System.out.println(method); }