Search in sources :

Example 1 with PrivateWebserverForTest

use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.

the class TestOptionsCorsRouting method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("domainsMeta2.txt", PrivateWebserverForTest.class.getClassLoader());
    PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(false, new SimpleMeterRegistry()), null, false, metaFile);
    webserver.start();
    httpsSocket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : PrivateWebserverForTest(org.webpieces.webserver.PrivateWebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 2 with PrivateWebserverForTest

use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.

the class TestStreaming method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("jsonMeta.txt", PrivateWebserverForTest.class.getClassLoader());
    PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(new SimpleMeterRegistry()), new TestOverrides(), true, metaFile);
    webserver.start();
    http2Socket = connectHttp(webserver.getUnderlyingHttpChannel().getLocalAddress());
}
Also used : PrivateWebserverForTest(org.webpieces.webserver.PrivateWebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 3 with PrivateWebserverForTest

use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.

the class TestJsonCustomFilter method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("jsonMeta.txt", PrivateWebserverForTest.class.getClassLoader());
    PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(isRemote, new SimpleMeterRegistry()), new TestOverrides(), true, metaFile);
    webserver.start();
    http11Socket = connectHttp(isRemote, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
Also used : PrivateWebserverForTest(org.webpieces.webserver.PrivateWebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 4 with PrivateWebserverForTest

use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.

the class TestKeepContextHttp2 method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    // fails if another test is leaking the context...
    Assert.assertEquals(new HashMap(), Context.getContext());
    VirtualFileClasspath metaFile = new VirtualFileClasspath("jsonMeta.txt", PrivateWebserverForTest.class.getClassLoader());
    PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(new SimpleMeterRegistry()), new TestOverrides(), true, metaFile);
    webserver.start();
    http2Socket = connectHttp(webserver.getUnderlyingHttpChannel().getLocalAddress());
}
Also used : PrivateWebserverForTest(org.webpieces.webserver.PrivateWebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Example 5 with PrivateWebserverForTest

use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.

the class TestGetCorsRouting method setUp.

@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
    VirtualFileClasspath metaFile = new VirtualFileClasspath("domainsMeta2.txt", PrivateWebserverForTest.class.getClassLoader());
    PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(false, new SimpleMeterRegistry()), null, false, metaFile);
    webserver.start();
    httpsSocket = connectHttps(false, null, webserver.getUnderlyingHttpsChannel().getLocalAddress());
}
Also used : PrivateWebserverForTest(org.webpieces.webserver.PrivateWebserverForTest) SimpleMeterRegistry(io.micrometer.core.instrument.simple.SimpleMeterRegistry) VirtualFileClasspath(org.webpieces.util.file.VirtualFileClasspath) Before(org.junit.Before)

Aggregations

SimpleMeterRegistry (io.micrometer.core.instrument.simple.SimpleMeterRegistry)43 PrivateWebserverForTest (org.webpieces.webserver.PrivateWebserverForTest)43 Before (org.junit.Before)42 VirtualFileClasspath (org.webpieces.util.file.VirtualFileClasspath)37 Module (com.google.inject.Module)4 JdbcApi (org.webpieces.ddl.api.JdbcApi)4 PrivateTestConfig (org.webpieces.webserver.PrivateTestConfig)4 OverridesForTestRealServer (org.webpieces.webserver.test.OverridesForTestRealServer)4 ArrayList (java.util.ArrayList)2 TemplateCompileConfig (org.webpieces.templatingdev.api.TemplateCompileConfig)2 VirtualFile (org.webpieces.util.file.VirtualFile)2 OverridesForEmbeddedSvrWithParsing (org.webpieces.webserver.test.OverridesForEmbeddedSvrWithParsing)2 File (java.io.File)1 Test (org.junit.Test)1 CompileConfig (org.webpieces.compiler.api.CompileConfig)1 TwoPools (org.webpieces.data.api.TwoPools)1 DevRouterModule (org.webpieces.devrouter.api.DevRouterModule)1 HttpSocket (org.webpieces.httpclient11.api.HttpSocket)1 ConnectionListener (org.webpieces.nio.api.handlers.ConnectionListener)1 DataListener (org.webpieces.nio.api.handlers.DataListener)1