public void TestMethodCleanup() { if (null != this.uploader) { Utility.TraceSource.WriteInfo( TraceType, "Setting event to allow any pending DTR processing pass to begin ..."); bool result = EndOfTest.Set(); Verify.IsTrue(result, "Successfully set event to allow pending DTR processing pass to begin"); this.uploader.Dispose(); this.uploader = null; } }
private bool CreateMdsUploader(string sectionName, out MdsEtwEventUploader uploader) { // Once Uploader is constructed DiskSpaceManager is no longer needed. using (var dsm = new DiskSpaceManager()) { ConfigReader.AddAppConfig(Utility.WindowsFabricApplicationInstanceId, null); var initParam = new ConsumerInitializationParameters( Utility.WindowsFabricApplicationInstanceId, sectionName, TestFabricNodeId, TestFabricNodeName, Utility.LogDirectory, Utility.DcaWorkFolder, dsm); uploader = new MdsEtwEventUploader(initParam); EtwCsvFolder = uploader.EtwCsvFolder; return(true); } }
public void TestMethodSetup() { // Initialization bool result = StartDtrRead.Reset() && DtrReadCompleted.Reset() && EndOfTest.Reset(); Verify.IsTrue(result, "Successfully reset all events at the start of the test"); // Parse the configuration file this.testStartTime = DateTime.UtcNow; ParseConfig(testStartTime); // Create the log and work directories Utility.LogDirectory = Path.Combine(testDataDirectory, this.testStartTime.Ticks.ToString(), LogFolderName); Utility.TraceSource.WriteInfo( TraceType, "Log folder: {0}", Utility.LogDirectory); Utility.InitializeWorkDirectory(); // Create the deleted items folder this.deletedItemsFolder = Path.Combine(testDataDirectory, this.testStartTime.Ticks.ToString(), DeletedItemsFolderName); FabricDirectory.CreateDirectory(deletedItemsFolder); Utility.TraceSource.WriteInfo( TraceType, "Deleted items folder: {0}", this.deletedItemsFolder); // Create the MDS upload consumer ConfigReader.AddAppConfig(Utility.WindowsFabricApplicationInstanceId, null); var initParam = new ConsumerInitializationParameters( Utility.WindowsFabricApplicationInstanceId, TestConfigSectionName, TestFabricNodeId, TestFabricNodeName, Utility.LogDirectory, Utility.DcaWorkFolder, new DiskSpaceManager()); this.uploader = new MdsEtwEventUploader(initParam); EtwCsvFolder = this.uploader.EtwCsvFolder; }