use of org.talend.components.api.component.runtime.BoundedReader in project components by Talend.
the class AzureStorageGetReaderTestIT method testBlobGetSub1.
@SuppressWarnings("rawtypes")
@Test
public void testBlobGetSub1() throws Exception {
cleanupLists();
prefixes.add("sub1/");
includes.add(true);
creates.add(true);
BoundedReader reader = createGetReader(false);
assertTrue(reader.start());
reader.close();
for (String file : TEST_SUB1_BLOBS) assertTrue(fileExistsAndHasTheGoodSize(file));
}
use of org.talend.components.api.component.runtime.BoundedReader in project components by Talend.
the class AzureStoragePutReaderTestIT method testBlobPutFolder.
@SuppressWarnings({ "unused", "rawtypes" })
@Test
public void testBlobPutFolder() throws Exception {
properties.useFileList.setValue(false);
BoundedReader reader = createBoundedReader(properties);
assertTrue(reader.start());
List<String> blobs = listAllBlobs(CONTAINER);
}
use of org.talend.components.api.component.runtime.BoundedReader in project components by Talend.
the class AzureStorageListReaderTestIT method listBlobs.
@SuppressWarnings("rawtypes")
public void listBlobs() throws Exception {
blobs.clear();
properties.remoteBlobs = remoteBlobs;
properties.schema.schema.setValue(schemaForBlobList);
BoundedReader reader = createBoundedReader(properties);
Object row;
Boolean rows = reader.start();
while (rows) {
row = ((IndexedRecord) reader.getCurrent()).get(0);
assertNotNull(row);
assertTrue(row instanceof String);
blobs.add(row.toString());
rows = reader.advance();
}
reader.close();
}
use of org.talend.components.api.component.runtime.BoundedReader in project components by Talend.
the class AzureStorageQueueDeleteReaderTestIT method testDeleteNonExistingQueue.
@SuppressWarnings("rawtypes")
@Test
public void testDeleteNonExistingQueue() throws Throwable {
TAzureStorageQueueDeleteProperties properties = new TAzureStorageQueueDeleteProperties("tests");
properties.setupProperties();
properties = (TAzureStorageQueueDeleteProperties) setupConnectionProperties((AzureStorageProvideConnectionProperties) properties);
properties.queueName.setValue(TEST_QUEUE_NAME_CREATE + "toto");
BoundedReader reader = createBoundedReader(properties);
assertFalse(reader.start());
reader.close();
}
use of org.talend.components.api.component.runtime.BoundedReader in project components by Talend.
the class AzureStorageBaseBlobTestIT method doContainerCreate.
/**
* doContainerCreate.
*
* @param container {@link String} container
* @param access {@link AccessControl} access
* @return <code>Boolean</code> {@link Boolean} boolean
* @throws Exception the exception
*/
@SuppressWarnings("rawtypes")
public Boolean doContainerCreate(String container, TAzureStorageContainerCreateProperties.AccessControl access) throws Exception {
TAzureStorageContainerCreateProperties properties = new TAzureStorageContainerCreateProperties("tests");
setupConnectionProperties(properties);
properties.container.setValue(container);
properties.accessControl.setValue(access);
BoundedReader reader = createBoundedReader(properties);
return reader.start();
}
Aggregations