From b65a58609f6d5061d4eb493b5dcdf2d9cbbab437 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Sun, 21 Nov 2004 01:22:46 +0000 Subject: [PATCH] dont test creating of services by default --- .../hyperic/sigar/win32/test/TestService.java | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java b/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java index f37a4b0d..9ad92334 100644 --- a/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java +++ b/bindings/java/src/net/hyperic/sigar/win32/test/TestService.java @@ -5,12 +5,20 @@ import net.hyperic.sigar.win32.Service; public class TestService extends TestCase { + private static final boolean TEST_CREATE = false; + public TestService(String name) { super(name); } - public void testServiceCreateDelete() throws Exception { + public void testServiceOpen() throws Exception { + Service service = new Service("Eventlog"); + } + public void testServiceCreateDelete() throws Exception { + if (!TEST_CREATE) { + return; + } Service service = Service.create("MyTestService", "My Test Service", @@ -18,11 +26,10 @@ public class TestService extends TestCase { "C:\\oracle\\ora90\\bin\\agntsrvc.exe"); } - public void testServiceOpen() throws Exception { - Service service = new Service("MyTestService"); - } - public void testDeleteService() throws Exception { + if (!TEST_CREATE) { + return; + } Service service = new Service("MyTestService"); service.delete(); }