private static List <DatasourceRecord> PushDummyRecords(MsmqRecordRepository queue, int numberOfRecords) { var dummyData = RandomDatasourceRecordGenerator.GenerateDummyData(numberOfRecords).ToList(); foreach (var record in dummyData) { queue.Push(record); } return(dummyData); }
public HttpResponseMessage Post(int dummyRecords) { Log.DebugFormat("Queueing {0} dummy records", dummyRecords); var records = RandomDatasourceRecordGenerator.GenerateDummyData(dummyRecords); _recordRepository.Push(records); Log.Debug("Records queued"); return(new HttpResponseMessage(HttpStatusCode.Created)); }
/// <summary> /// This is really an integration test. Ignore by default. /// </summary> // [TestMethod] //[Ignore] // public void AdhocDataPush() // { // var blobConfig = new DataPusherConfiguration() // { // PushBatchSize = 6, // ServiceBusConnectionString = "Endpoint=sb://manufacturing.servicebus.windows.net/;SharedAccessKeyName=ClientPush;SharedAccessKey=RUCIbZu2VQlYrsscSi/4eHDUhfCWmrbgKbLbY7DxJ3Q=", // PushIntervalSeconds= 3, // ServiceBusQueueName = "cloudreceive" // }; // // var dummyData = GenerateDummyData(); // // s.PushRecords(dummyData, "cloudreceive"); // var serializer = new DatasourceRecordSerializer(); // var s = new ServiceBusQueueDataPusher(blobConfig, serializer); // var dummyData = GenerateDummyData(); // s.PushRecords(dummyData); // } public static IEnumerable <DatasourceRecord> GenerateDummyData() { return(RandomDatasourceRecordGenerator.GenerateDummyData(6000)); }