diff options
8 files changed, 51 insertions, 30 deletions
diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java index 7688a5dd26..a427a076cd 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomDeleteTestCase.java @@ -49,8 +49,12 @@ public class AtomDeleteTestCase { @AfterClass public static void destroy() throws Exception { // System.out.println(">>>AtomDeleteTestCase.destroy entry"); - scaConsumerDomain.close(); - scaProviderDomain.close(); + if (scaConsumerDomain != null) { + scaConsumerDomain.close(); + } + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } } @Test diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java index 03a427f11c..32a01ebe2a 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomGetTestCase.java @@ -47,8 +47,12 @@ public class AtomGetTestCase { @AfterClass public static void destroy() throws Exception { // System.out.println(">>>AtomGetTestCase.destroy entry"); - scaConsumerDomain.close(); - scaProviderDomain.close(); + if (scaConsumerDomain != null) { + scaConsumerDomain.close(); + } + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } } @Test diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java index e9e0e315ab..49e9c2f25f 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPostTestCase.java @@ -47,8 +47,12 @@ public class AtomPostTestCase { @AfterClass public static void destroy() throws Exception { System.out.println(">>>AtomPostTestCase.destroy entry"); - scaConsumerDomain.close(); - scaProviderDomain.close(); + if (scaConsumerDomain != null) { + scaConsumerDomain.close(); + } + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } } @Test diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java index c46634e784..3aaad681f4 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/AtomPutTestCase.java @@ -49,8 +49,12 @@ public class AtomPutTestCase { @AfterClass public static void destroy() throws Exception { // System.out.println(">>>AtomPutTestCase.destroy entry"); - scaConsumerDomain.close(); - scaProviderDomain.close(); + if (scaConsumerDomain != null) { + scaConsumerDomain.close(); + } + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } } @Test diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java index 394cdf3f6d..2ed0729b00 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/MediaCollectionTestCase.java @@ -51,7 +51,6 @@ import org.junit.Test; */ public class MediaCollectionTestCase { public final static String providerURI = "http://localhost:8084/receipt"; - protected static SCADomain scaConsumerDomain; protected static SCADomain scaProviderDomain; protected static CustomerClient testService; protected static Abdera abdera; @@ -71,11 +70,13 @@ public class MediaCollectionTestCase { abderaParser = Abdera.getNewParser(); } - @AfterClass - public static void destroy() throws Exception { - System.out.println(">>>MediaCollectionTestCase.destroy"); - scaProviderDomain.close(); - } + @AfterClass + public static void destroy() throws Exception { + System.out.println(">>>MediaCollectionTestCase.destroy"); + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } + } @Test public void testPrelim() throws Exception { diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java index 1ba1dcca11..c209e2dfe6 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderEntryEntityTagsTestCase.java @@ -47,7 +47,6 @@ import org.junit.Test; */ public class ProviderEntryEntityTagsTestCase { public final static String providerURI = "http://localhost:8084/customer"; - protected static SCADomain scaConsumerDomain; protected static SCADomain scaProviderDomain; protected static CustomerClient testService; protected static Abdera abdera; @@ -66,11 +65,13 @@ public class ProviderEntryEntityTagsTestCase { abderaParser = Abdera.getNewParser(); } - @AfterClass - public static void destroy() throws Exception { - System.out.println(">>>ProviderEntryEntityTagsTestCase.destroy"); - scaProviderDomain.close(); - } + @AfterClass + public static void destroy() throws Exception { + System.out.println(">>>ProviderEntryEntityTagsTestCase.destroy"); + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } + } @Test public void testPrelim() throws Exception { diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java index 030bed62e5..42edeb8f0d 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderFeedEntityTagsTestCase.java @@ -53,7 +53,6 @@ import org.junit.Test; */ public class ProviderFeedEntityTagsTestCase { public final static String providerURI = "http://localhost:8084/customer"; - protected static SCADomain scaConsumerDomain; protected static SCADomain scaProviderDomain; protected static CustomerClient testService; protected static Abdera abdera; @@ -72,11 +71,13 @@ public class ProviderFeedEntityTagsTestCase { abderaParser = Abdera.getNewParser(); } - @AfterClass - public static void destroy() throws Exception { - System.out.println(">>>ProviderFeedEntityTagsTestCase.destroy"); - scaProviderDomain.close(); - } + @AfterClass + public static void destroy() throws Exception { + System.out.println(">>>ProviderFeedEntityTagsTestCase.destroy"); + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } + } @Test public void testPrelim() throws Exception { diff --git a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderServiceDocumentTestCase.java b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderServiceDocumentTestCase.java index a92d4577d1..0d4194070d 100644 --- a/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderServiceDocumentTestCase.java +++ b/branches/sca-java-1.x/modules/binding-atom-abdera/src/test/java/org/apache/tuscany/sca/binding/atom/ProviderServiceDocumentTestCase.java @@ -65,10 +65,12 @@ public class ProviderServiceDocumentTestCase { abderaParser = Abdera.getNewParser(); } - @AfterClass - public static void destroy() throws Exception { - scaProviderDomain.close(); - } + @AfterClass + public static void destroy() throws Exception { + if (scaProviderDomain != null) { + scaProviderDomain.close(); + } + } @Test public void testPrelim() throws Exception { |