/** * A test with data with a timestamp one hour ago. No data should be identified as being deleteable */ @Test public void oneHourOldDataIntoDefaultBucketFileOutputTest() { // All the data is "new" so none should be ready to be aged-off loadOneHourData(); completeSetup(new Integer[0]); String expectedFileOutput = getOneHourOldDataSimulatedFileOutput(); String generatedOutput = readGeneratedFile(); Assert.assertEquals(expectedFileOutput, generatedOutput); }
/** * A test using the assorted data, 2 - 31 days old, using one bucket of three days. So all day older than three days should have a delete statement. */ @Test public void assortedDataIntoThreeDayBucketFileOutputTest() { // Should identify data more than three days old in the log and deletion script loadAssortedData(); completeSetup(new Integer[] {3}); String expectedFileOutput = getAssortedDataThreeDayBucketSimulatedFileOutput(); String generatedOutput = readGeneratedFile(); Assert.assertEquals(expectedFileOutput, generatedOutput); }
/** * A test that has an assorted of rowws with different timestamps */ @Test public void assortedDataIntoDefaultBucketFileOutputTest() { // The data entered into accumulo: 2 - one day old, 2 two days old, two , 2 eight days old, 2 fifteen days old // and two thirty one days old. The last eight should be removed by the default buckets loadAssortedData(); completeSetup(new Integer[0]); String expectedFileOutput = getAssortedSimulatedFileOutput(); String generatedOutput = readGeneratedFile(); Assert.assertEquals(expectedFileOutput, generatedOutput); }