Amazon.KinesisTap.Core.Test/DirectoryWatcherTest.cs
/// <summary>
/// File name contains time stamp. Only write to the new file name. Never rename file.
/// </summary>
/// <returns></returns>
File name contains time stamp. Only write to the new file name. Never rename file.
File name contains time stamp . Only write to the new file name . Never rename file .
[Fact]
        public async Task FileNameContainingDateTimeStampTest()
        {
            string testName = "FileNameContainingDateTimeStampTest";
            string filter = "KinesisTapDateTimeStamp??????????????.log";
            string logFileNameFormat = "KinesisTapDateTimeStamp{0:yyyyMMddhhmmss}.log";
            await CreateAndRunWatcher(testName, filter, async (logRecords) =>
            {
                int accumulatedRecords = 0;
                string filePath = GetFileNameFromTimeStamp(testName, logFileNameFormat);
                accumulatedRecords = await RunDirectoryWatcherTest(filePath, logRecords, accumulatedRecords);
                filePath = GetFileNameFromTimeStamp(testName, logFileNameFormat);
                accumulatedRecords = await RunDirectoryWatcherTest(filePath, logRecords, accumulatedRecords);
            });
        }
[ Fact ] public async Task FileNameContainingDateTimeStampTest ( ) { string testName = " " ; string filter = " " ; string logFileNameFormat = " " ; await CreateAndRunWatcher ( testName , filter , async ( logRecords ) => { int accumulatedRecords = 0 ; string filePath = GetFileNameFromTimeStamp ( testName , logFileNameFormat ) ; accumulatedRecords = await RunDirectoryWatcherTest ( filePath , logRecords , accumulatedRecords ) ; filePath = GetFileNameFromTimeStamp ( testName , logFileNameFormat ) ; accumulatedRecords = await RunDirectoryWatcherTest ( filePath , logRecords , accumulatedRecords ) ; } ) ; }
File name contains time stamp.
File name contains time stamp .
//Run one batch of test //Run another batch of test with a different file name
None