More testing of embedded examples
Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
parent
4f87da5f25
commit
bec14ff870
|
@ -70,11 +70,12 @@ public class JettyDistribution
|
|||
|
||||
if (distro == null)
|
||||
{
|
||||
LOG.info("JettyDistribution() = FAILURE");
|
||||
throw new RuntimeException("Unable to find built jetty-distribution, run the build and try again.");
|
||||
LOG.info("JettyDistribution() FAILURE: NOT FOUND");
|
||||
}
|
||||
else
|
||||
{
|
||||
LOG.debug("JettyDistribution() FOUND = " + distro);
|
||||
}
|
||||
|
||||
LOG.debug("JettyDistribution() FOUND = " + distro);
|
||||
DISTRIBUTION = distro;
|
||||
}
|
||||
|
||||
|
@ -125,6 +126,8 @@ public class JettyDistribution
|
|||
|
||||
public static Path resolve(String path)
|
||||
{
|
||||
if (DISTRIBUTION == null)
|
||||
throw new RuntimeException("jetty-distribution not found");
|
||||
return DISTRIBUTION.resolve(path);
|
||||
}
|
||||
|
||||
|
|
|
@ -32,6 +32,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
|
||||
public class LikeJettyXmlTest extends AbstractEmbeddedTest
|
||||
{
|
||||
|
@ -42,6 +43,8 @@ public class LikeJettyXmlTest extends AbstractEmbeddedTest
|
|||
@BeforeEach
|
||||
public void startServer() throws Exception
|
||||
{
|
||||
assumeTrue(JettyDistribution.DISTRIBUTION != null, "jetty-distribution not found");
|
||||
|
||||
server = LikeJettyXml.createServer(0, 0, false);
|
||||
server.start();
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
|
||||
public class OneWebAppTest extends AbstractEmbeddedTest
|
||||
{
|
||||
|
@ -39,6 +40,8 @@ public class OneWebAppTest extends AbstractEmbeddedTest
|
|||
@BeforeEach
|
||||
public void startServer() throws Exception
|
||||
{
|
||||
assumeTrue(JettyDistribution.DISTRIBUTION != null, "jetty-distribution not found");
|
||||
|
||||
server = OneWebApp.createServer(0);
|
||||
server.start();
|
||||
}
|
||||
|
|
|
@ -31,6 +31,7 @@ import org.junit.jupiter.api.Test;
|
|||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
|
||||
public class OneWebAppWithJspTest extends AbstractEmbeddedTest
|
||||
{
|
||||
|
@ -40,6 +41,8 @@ public class OneWebAppWithJspTest extends AbstractEmbeddedTest
|
|||
@BeforeEach
|
||||
public void startServer() throws Exception
|
||||
{
|
||||
assumeTrue(JettyDistribution.DISTRIBUTION != null, "jetty-distribution not found");
|
||||
|
||||
server = OneWebAppWithJsp.createServer(0);
|
||||
server.start();
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ import static org.hamcrest.MatcherAssert.assertThat;
|
|||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
|
||||
public class ServerWithAnnotationsTest extends AbstractEmbeddedTest
|
||||
{
|
||||
|
@ -39,6 +40,8 @@ public class ServerWithAnnotationsTest extends AbstractEmbeddedTest
|
|||
@BeforeEach
|
||||
public void startServer() throws Exception
|
||||
{
|
||||
assumeTrue(JettyDistribution.DISTRIBUTION != null, "jetty-distribution not found");
|
||||
|
||||
server = ServerWithAnnotations.createServer(0);
|
||||
server.start();
|
||||
}
|
||||
|
|
|
@ -32,6 +32,7 @@ import static org.hamcrest.Matchers.allOf;
|
|||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.hamcrest.Matchers.is;
|
||||
import static org.hamcrest.Matchers.not;
|
||||
import static org.junit.jupiter.api.Assumptions.assumeTrue;
|
||||
|
||||
public class ServerWithJNDITest extends AbstractEmbeddedTest
|
||||
{
|
||||
|
@ -40,6 +41,8 @@ public class ServerWithJNDITest extends AbstractEmbeddedTest
|
|||
@BeforeEach
|
||||
public void startServer() throws Exception
|
||||
{
|
||||
assumeTrue(JettyDistribution.DISTRIBUTION != null, "jetty-distribution not found");
|
||||
|
||||
server = ServerWithJNDI.createServer(0);
|
||||
server.start();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue