*/
@Test
public void testPartitionedFileJdbcJob() {
String data = UUID.randomUUID().toString();
jdbcSink.getJdbcTemplate().getDataSource();
FileJdbcJob job = new FileJdbcJob(FileJdbcJob.DEFAULT_DIRECTORY,
String.format("/%spartition*", DEFAULT_FILE_NAME),
FileJdbcJob.DEFAULT_TABLE_NAME,
FileJdbcJob.DEFAULT_NAMES);
for (int i = 0; i < 5; i++) {
// Create a stream that writes to a file. This file will be used by the job.
stream("dataSender" + i, sources.http("foobar", 9000 + i) + XD_DELIMITER
+ sinks.file(FileJdbcJob.DEFAULT_DIRECTORY, DEFAULT_FILE_NAME + "partition" + i).toDSL());
sources.http(getContainerHostForSource("dataSender" + i), 9000 + i).postData(data);
}
waitForXD();
job(job.toDSL());
waitForXD();
jobLaunch();
String query = String.format("SELECT data FROM %s", tableName);
waitForTablePopulation(query, jdbcSink.getJdbcTemplate(), 5);