示例#1
0
        public static void MyClassInitialize(TestContext testContext)
        {
            Test.FullClassName = testContext.FullyQualifiedTestClassName;

            srcConnectionString  = Test.Data.Get("StorageConnectionString");
            destConnectionString = Test.Data.Get("StorageConnectionString2");
            srcBlobHelper        = new CloudBlobHelper(CloudStorageAccount.Parse(srcConnectionString));
            destBlobHelper       = new CloudBlobHelper(CloudStorageAccount.Parse(destConnectionString));

            destStorageContext = PowerShellAgent.GetStorageContext(destConnectionString);

            FolderName = Test.Data.Get("FolderName");

            //delete perf files
            Helper.DeletePattern(FolderName + "_*");

            // import module
            PowerShellAgent.ImportModules(Constants.ServiceModulePaths);

            //set the default storage context
            PowerShellAgent.SetStorageContext(srcConnectionString);

            //set the ConcurrentTaskCount field
            PowerShellAgent.ConcurrentTaskCount = Environment.ProcessorCount * 8;

            // initialize the dictionary for saving perf data
            foreach (string operation in operations)
            {
                fileNumTimes.Add(operation, new Dictionary <int, double>());
                fileNumTimeSDs.Add(operation, new Dictionary <int, double>());
            }

            Trace.WriteLine("ClassInit");
        }
示例#2
0
        public static void ClassInit(TestContext testContext)
        {
            TestBase.TestClassInitialize(testContext);

            // import module
            PowerShellAgent.ImportModules(Constants.ServiceModulePaths);

            //set the default storage context
            PowerShellAgent.SetStorageContext(StorageAccount.ToString(true));

            //set the ConcurrentTaskCount field
            PowerShellAgent.ConcurrentTaskCount = Environment.ProcessorCount * 8;
        }
示例#3
0
        public static void MyClassInitialize(TestContext testContext)
        {
            TestBase.TestClassInitialize(testContext);

            //delete perf files
            Helper.DeletePattern("testfile_*");

            BlobHelper = new CloudBlobHelper(StorageAccount);
            FileHelper = new CloudFileHelper(StorageAccount);

            FileName   = Test.Data.Get("FileName");
            FolderName = Test.Data.Get("FolderName");

            // import module
            PowerShellAgent.ImportModules(Constants.ServiceModulePaths);

            //set the ConcurrentTaskCount field
            PowerShellAgent.ConcurrentTaskCount = Environment.ProcessorCount * 8;

            Trace.WriteLine("ClassInit");
        }