protected void testDataFormat(String format) throws Exception { long max = System.currentTimeMillis() + 10000; while (true) { try { DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format); assertNotNull(dataFormatDefinition); assertNotNull( dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext()))); return; } catch (Exception t) { if (System.currentTimeMillis() < max) { Thread.sleep(1000); continue; } else { throw t; } } } }
private void findDataFormat(DataFormatDefinition dfd, Set<String> dataformats) { if (dfd != null && dfd.getDataFormatName() != null) { dataformats.add(dfd.getDataFormatName()); } }