package org.apache.cassandra;

import org.testng.annotations.Test;
import org.testng.annotations.BeforeMethod;
import org.apache.cassandra.config.DatabaseDescriptor;

import java.io.File;

@Test(groups={"serial"})
public class ServerTest {
    // TODO clean up static structures too (e.g. memtables)
    @BeforeMethod
    public void cleanup()
    {
        String[] directoryNames = {
                DatabaseDescriptor.getBootstrapFileLocation(),
                DatabaseDescriptor.getLogFileLocation(),
                DatabaseDescriptor.getDataFileLocation(),
                DatabaseDescriptor.getMetadataDirectory(),
        };

        for (String dirName : directoryNames)
        {
            File dir = new File(dirName);
            if (!dir.exists())
            {
                throw new RuntimeException("No such directory: " + dir.getAbsolutePath());
            }
        }
    }

@@ -872,24 +872,123 @@
           %7D%0A
+            for (File f : dir.listFiles())%0A            %7B%0A                f.delete();%0A            %7D%0A
         %7D%0A  
@@ -987,12 +987,13 @@
     %7D%0A    %7D%0A
+%7D

fix bad merge