use of io.questdb.network.ServerDisconnectException in project questdb by bluestreak01.
the class RetryIODispatcherTest method testFailsWhenInvalidDataImportedLoop.
@Test
public void testFailsWhenInvalidDataImportedLoop() throws Exception {
for (int i = 0; i < 5; i++) {
System.out.println("*************************************************************************************");
System.out.println("************************** Run " + i + " ********************************");
System.out.println("*************************************************************************************");
testImportWaitsWhenWriterLocked(new HttpQueryTestBuilder().withTempFolder(temp).withWorkerCount(2).withHttpServerConfigBuilder(new HttpServerConfigurationBuilder()).withCustomTextImportProcessor(((configuration, engine, workerCount) -> new TextImportProcessor(engine) {
@Override
public void onRequestRetry(HttpConnectionContext context) throws ServerDisconnectException {
throw ServerDisconnectException.INSTANCE;
}
})), 0, ValidImportRequest, ValidImportResponse, false, true);
temp.delete();
temp.create();
}
}
Aggregations