コード例 #1
0
 /**
  * Generates a test SSTable for use in this classes' tests. Uncomment and run against an older
  * build and the output will be copied to a version subdirectory in 'LEGACY_SSTABLE_ROOT' @Test
  * public void buildTestSSTable() throws IOException { // write the output in a version specific
  * directory Descriptor dest = getDescriptor(Descriptor.CURRENT_VERSION); assert
  * dest.directory.mkdirs() : "Could not create " + dest.directory + ". Might it already exist?";
  *
  * <p>SSTableReader ssTable = SSTableUtils.writeRawSSTable(new
  * File(dest.filenameFor(SSTable.COMPONENT_DATA)), KSNAME, CFNAME, TEST_DATA); assert
  * ssTable.desc.generation == 0 : "In order to create a generation 0 sstable, please run this test
  * alone."; System.out.println(">>> Wrote " + dest); }
  */
 @Test
 public void testVersions() throws IOException {
   for (File version : LEGACY_SSTABLE_ROOT.listFiles())
     if (Descriptor.versionValidate(version.getName())) testVersion(version.getName());
 }