Example #1
0
        static void TestMethod_TestIndividualFailures()
        {
            var sDirectory = Testing.SetUpSynctestEnvironment();
            CCreateSyncResultsSet results;

            CCreateSyncResultsSet.showWarnings = false;
            using (Stream iStream2 = File.Open(sDirectory + "\\src\\Licenses\\OpenSsl-License.txt", FileMode.Append, FileAccess.Write, FileShare.None))
            {
                var config = GetRealConfig(sDirectory, 4 /*nThreads*/);
                config.m_nRetries           = "1";
                config.m_waitBetweenRetries = "1";
                string sLogFilename = RunImplementation.GetLogFilename();
                RunImplementation.Go(config, sLogFilename, false /*preview*/, false);
                results = CCreateSyncResultsSet.ParseFromLogFile(config, sLogFilename, false /*preview*/);
                File.Delete(sLogFilename);
            }

            CCreateSyncResultsSet.showWarnings = true;

            Utils.AssertEq(0, results.items.Count);
            Utils.AssertEq(true, results.sSummary.Contains("Summary indicated failures"));
            Utils.AssertEq(true, results.sSummary.Contains("*EXTRA File"));
            Utils.AssertEq(true, results.sSummary.Contains("it is being used by another process"));
            Utils.AssertEq(true, results.sSummary.Contains("RETRY LIMIT EXCEEDED"));
            Utils.AssertEq(true, results.sSummary.Contains("Bytes :"));
        }
Example #2
0
        static void TestMethod_TestPreviewOfFileSyncAndActualSync()
        {
            string sDirectory = Testing.SetUpSynctestEnvironment();

            TestSyncPreview(sDirectory, 1 /*nThreads*/);
            TestSyncPreview(sDirectory, 4 /*nThreads*/);

            TestActualSync(sDirectory, 1 /*nThreads*/);
            Testing.SetUpSynctestEnvironment();
            TestActualSync(sDirectory, 4 /*nThreads*/);
        }