<commit_before>package com.zakgof.db.velvet.test;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.function.Supplier;

import org.apache.commons.text.StrSubstitutor;
import org.junit.AfterClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import com.zakgof.db.velvet.IVelvetEnvironment;
import com.zakgof.db.velvet.VelvetException;
import com.zakgof.db.velvet.VelvetFactory;

@RunWith(Suite.class)

@SuiteClasses({

    PrimarySortedLinkTest.class,
    PrimarySortedLinkTest2.class,
    SortedStoreTest.class,
    KeylessTest.class,
    PutGetTest.class,
    SimpleLinkTest.class,

  /*
    StoreIndexesTest.class,
    SecondarySortedLinkTest.class,
    PerformanceTest.class,
    ConcurrentWriteTest.class,

    */
})

public abstract class VelvetTestSuite {

    protected static Supplier<IVelvetEnvironment> velvetProvider;
    private static IVelvetEnvironment env;
    private static String PATH;

    protected static void setup(String providerName) {
        try {
            PATH = Files.createTempDirectory("velvet").toString();
        } catch (IOException e) {
            throw new VelvetException(e);
        }
        velvetProvider = () -> createVelvet(providerName);
    }

    private static IVelvetEnvironment createVelvet(String providerName) {
        tearDownClass();
        if (providerName.equals("datastore")) {
            String url =  StrSubstitutor.replaceSystemProperties("velvetdb://datastore/${velvetdb.datastore.projectId}/?credentialPath=${velvetdb.datastore.credentialPath}&proxyHost=${velvetdb.datastore.proxyHost}&proxyPort=${velvetdb.datastore.proxyPort}&proxyUser=${velvetdb.datastore.proxyUser}&proxyPassword=${velvetdb.datastore.proxyPassword}");
            env = VelvetFactory.open(url);
        } else if (providerName.equals("dynamodb")) {
            String url =  StrSubstitutor.replaceSystemProperties("velvetdb://dynamodb/us-west-2?awsAccessKeyId=${velvetdb.aws.accessKeyId}&awsSecretKey=${velvetdb.aws.secretKey}");
            env = VelvetFactory.open(url);
        } else{
            new File(PATH).mkdirs();
            env = VelvetFactory.open("velvetdb://" + providerName + "/" + PATH.replace(File.separatorChar, '/'));
            // env.setSerializer(() -> new KryoSerializer());
            // env.setSerializer(() -> new ElsaVelvetSerializer());
        }
        return env;
    }

    @AfterClass
    public static void tearDownClass() {
        if (env != null) {
            env.close();
            for (File file : new File(PATH).listFiles())
                file.delete();
        }
    }
}<commit_msg>Resolve conflicts<commit_after>package com.zakgof.db.velvet.test;

import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.function.Supplier;

import org.apache.commons.text.StrSubstitutor;
import org.junit.AfterClass;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

import com.zakgof.db.velvet.IVelvetEnvironment;
import com.zakgof.db.velvet.VelvetException;
import com.zakgof.db.velvet.VelvetFactory;

@RunWith(Suite.class)

@SuiteClasses({


    PrimarySortedLinkTest.class,
    PrimarySortedLinkTest2.class,
    SortedStoreTest.class,
    SimpleLinkTest.class,
    KeylessTest.class,
    PutGetTest.class,

    /*
    StoreIndexesTest.class,
    SecondarySortedLinkTest.class,
    PerformanceTest.class,
    */
})

public abstract class VelvetTestSuite {

    protected static Supplier<IVelvetEnvironment> velvetProvider;
    private static IVelvetEnvironment env;
    private static String PATH;

    protected static void setup(String providerName) {
        try {
            PATH = Files.createTempDirectory("velvet").toString();
        } catch (IOException e) {
            throw new VelvetException(e);
        }
        velvetProvider = () -> createVelvet(providerName);
    }

    private static IVelvetEnvironment createVelvet(String providerName) {
        tearDownClass();
        if (providerName.equals("datastore")) {
            String url =  StrSubstitutor.replaceSystemProperties("velvetdb://datastore/${velvetdb.datastore.projectId}/?credentialPath=${velvetdb.datastore.credentialPath}&proxyHost=${velvetdb.proxyHost}&proxyPort=${velvetdb.proxyPort}&proxyUser=${velvetdb.proxyUser}&proxyPassword=${velvetdb.proxyPassword}");
            env = VelvetFactory.open(url);
        } else if (providerName.equals("dynamodb")) {
            String url =  StrSubstitutor.replaceSystemProperties("velvetdb://dynamodb/us-west-2?awsAccessKeyId=${velvetdb.aws.accessKeyId}&awsSecretKey=${velvetdb.aws.secretKey}&proxyHost=${velvetdb.proxyHost}&proxyPort=${velvetdb.proxyPort}&proxyUser=${velvetdb.proxyUser}&proxyPassword=${velvetdb.proxyPassword}");
            env = VelvetFactory.open(url);
            env.execute(velvet -> {
                velvet.getClass().getDeclaredMethod("killAll").invoke(velvet);
            });
        } else{
            new File(PATH).mkdirs();
            env = VelvetFactory.open("velvetdb://" + providerName + "/" + PATH.replace(File.separatorChar, '/'));
            // env.setSerializer(() -> new KryoSerializer());
            // env.setSerializer(() -> new ElsaVelvetSerializer());
        }
        return env;
    }

    @AfterClass
    public static void tearDownClass() {
        if (env != null) {
            env.close();
            for (File file : new File(PATH).listFiles())
                file.delete();
        }
    }
}
{'fraction_non_alphanumeric': 0.12428160919540229, 'fraction_numerical': 0.0007183908045977011, 'mean_word_length': 3.2772657450076803, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2563736', 'n_tokens_mistral': 1683, 'n_tokens_neox': 1646, 'n_words': 244}