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;