MARMOTTA-666: adapted PrefixCC test for only run when there is Internet access
Project: http://git-wip-us.apache.org/repos/asf/marmotta/repo Commit: http://git-wip-us.apache.org/repos/asf/marmotta/commit/4e124fd6 Tree: http://git-wip-us.apache.org/repos/asf/marmotta/tree/4e124fd6 Diff: http://git-wip-us.apache.org/repos/asf/marmotta/diff/4e124fd6 Branch: refs/heads/develop Commit: 4e124fd6d97239bb182f4ebfab3a22e6dbb16f7d Parents: 7f69191 Author: Sergio Fernández <[email protected]> Authored: Wed Jun 7 11:33:25 2017 +0200 Committer: Sergio Fernández <[email protected]> Committed: Wed Jun 7 11:33:25 2017 +0200 ---------------------------------------------------------------------- .../platform/core/test/prefix/PrefixCCTest.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/marmotta/blob/4e124fd6/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/prefix/PrefixCCTest.java ---------------------------------------------------------------------- diff --git a/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/prefix/PrefixCCTest.java b/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/prefix/PrefixCCTest.java index a8b852b..22ebba8 100644 --- a/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/prefix/PrefixCCTest.java +++ b/platform/marmotta-core/src/test/java/org/apache/marmotta/platform/core/test/prefix/PrefixCCTest.java @@ -21,10 +21,7 @@ import java.util.Random; import org.apache.marmotta.platform.core.services.prefix.PrefixCC; import org.apache.marmotta.platform.core.test.base.EmbeddedMarmotta; -import org.junit.AfterClass; -import org.junit.Assert; -import org.junit.BeforeClass; -import org.junit.Test; +import org.junit.*; /** * Test the functionality of our prefix.cc implementation @@ -46,7 +43,7 @@ public class PrefixCCTest { prefixcc = marmotta.getService(PrefixCC.class); random = new Random(); } - + @AfterClass public static void tearDown() { marmotta.shutdown(); @@ -55,6 +52,11 @@ public class PrefixCCTest { random = null; } + @Before + public void checks() { + Assume.assumeTrue(prefixcc.ping()); + } + @Test public void testGetNamespace() { Assert.assertEquals(NAMESPACE, prefixcc.getNamespace(PREFIX));
