use of org.talend.components.azurestorage.queue.runtime.AzureStorageQueueSink in project components by Talend.
the class AzureStorageQueuePurgeReaderTestIT method fillInQueue.
@Before
public void fillInQueue() throws Throwable {
TAzureStorageQueueOutputProperties properties = new TAzureStorageQueueOutputProperties("tests");
properties = (TAzureStorageQueueOutputProperties) setupConnectionProperties((AzureStorageProvideConnectionProperties) properties);
properties.setupProperties();
properties.queueName.setValue(TEST_QUEUE_NAME);
AzureStorageQueueSink sink = new AzureStorageQueueSink();
sink.initialize(null, properties);
sink.validate(null);
Writer<?> writer = sink.createWriteOperation().createWriter(null);
writer.open("test-uid");
for (String m : messages) {
IndexedRecord entity = new GenericData.Record(properties.schema.schema.getValue());
entity.put(0, m + "SIMPLE");
writer.write(entity);
}
writer.close();
queue.downloadAttributes();
assertTrue(queue.getApproximateMessageCount() > 3);
}
use of org.talend.components.azurestorage.queue.runtime.AzureStorageQueueSink in project components by Talend.
the class AzureStorageQueueOutputWriterTestIT method createWriter.
public Writer<?> createWriter(ComponentProperties properties) {
AzureStorageQueueSink sink = new AzureStorageQueueSink();
sink.initialize(null, properties);
sink.validate(null);
return sink.createWriteOperation().createWriter(null);
}
Aggregations