use of com.questdb.ServerConfiguration in project questdb by bluestreak01.
the class QueryHandlerConsistencyTest method testHandler.
private void testHandler(ContextHandler handler) throws Exception {
TestChannel channel = new TestChannel(QUERY1);
String expected = null;
handler.setupThread();
try {
ServerConfiguration configuration = new ServerConfiguration();
for (int i = 128; i < 7500; i++) {
channel.reset();
configuration.setHttpBufRespContent(i);
try (IOContext context = new IOContext(channel, configuration, MillisecondClockImpl.INSTANCE)) {
context.request.read();
handler.handle(context);
if (expected != null) {
TestUtils.assertEquals(expected, channel.getOutput());
} else {
expected = channel.getOutput().toString();
}
}
}
} finally {
channel.free();
}
}
use of com.questdb.ServerConfiguration in project questdb by bluestreak01.
the class QueryHandlerConsistencyTest method testQueryHandlerConsistency.
@Test
public void testQueryHandlerConsistency() throws Exception {
BootstrapEnv env = new BootstrapEnv();
env.configuration = new ServerConfiguration();
env.factory = FACTORY_CONTAINER.getFactory();
testHandler(new QueryHandler(env));
}
use of com.questdb.ServerConfiguration in project questdb by bluestreak01.
the class QueryHandlerSmallBufferTest method setUp.
@BeforeClass
public static void setUp() throws Exception {
BootstrapEnv env = new BootstrapEnv();
env.configuration = new ServerConfiguration();
env.configuration.setHttpBufRespContent(128);
env.factory = FACTORY_CONTAINER.getFactory();
handler = new QueryHandler(env);
env.matcher = new SimpleUrlMatcher() {
{
put("/js", handler);
}
};
server = new HttpServer(env);
server.start();
QueryHandlerTest.generateJournal("large", RECORD_COUNT);
}
Aggregations