use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestSyncHibernate method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
// clear in-memory database
JdbcApi jdbc = JdbcFactory.create(JdbcConstants.jdbcUrl, JdbcConstants.jdbcUser, JdbcConstants.jdbcPassword);
jdbc.dropAllTablesFromDatabase();
VirtualFileClasspath metaFile = new VirtualFileClasspath("plugins/hibernateMeta.txt", PrivateWebserverForTest.class.getClassLoader());
PrivateTestConfig config = new PrivateTestConfig();
config.setPlatformOverrides(getOverrides(false, new SimpleMeterRegistry()));
config.setMetaFile(metaFile);
config.setAppOverrides(new TestModule(mock));
PrivateWebserverForTest webserver = new PrivateWebserverForTest(config);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestAsynchronousErrors method setUp.
@Before
public void setUp() throws InterruptedException, ClassNotFoundException, ExecutionException, TimeoutException {
Asserts.assertWasCompiledWithParamNames("test");
VirtualFileClasspath metaFile = new VirtualFileClasspath("asyncMeta.txt", PrivateWebserverForTest.class.getClassLoader());
PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(false, new SimpleMeterRegistry()), new AppOverridesModule(), false, metaFile);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
use of org.webpieces.webserver.PrivateWebserverForTest in project webpieces by deanhiller.
the class TestAsyncWebServer method setUp.
@Before
public void setUp() throws InterruptedException, ExecutionException, TimeoutException {
VirtualFileClasspath metaFile = new VirtualFileClasspath("asyncMeta.txt", PrivateWebserverForTest.class.getClassLoader());
PrivateWebserverForTest webserver = new PrivateWebserverForTest(getOverrides(false, new SimpleMeterRegistry()), new AppOverridesModule(), false, metaFile);
webserver.start();
http11Socket = connectHttp(false, webserver.getUnderlyingHttpChannel().getLocalAddress());
}
Aggregations