<commit_before>/*
 * sonLibKVDatabaseTest.c
 *
 */

#include "sonLibGlobalsTest.h"

static stKVDatabase *database = NULL;

static void teardown() {
    if (database != NULL) {
        stKVDatabase_deleteFromDisk(database);
        stKVDatabase_destruct(database);
        database = NULL;
    }
}

static stKVDatabaseConf *getConf() {
    static stKVDatabaseConf *conf = NULL;
    if (conf == NULL) {
#if 1
        conf = stKVDatabaseConf_constructTokyoCabinet("testTCDatabase");
        fprintf(stderr, "running Tokyo Cabinet sonLibKVDatabase tests\n");
#elif 0
        //host="localhost" port="0" user="root" password="" database_name="cactus"
        conf = stKVDatabaseConf_constructMySql("localhost", 0, "root", "", "cactus", "cactusDbTest");
        fprintf(stderr, "running MySQL local sonLibKVDatabase tests\n");
#else
        conf = stKVDatabaseConf_constructMySql("kolossus-10", 0, "cactus", "cactus", "cactus", "cactusDbTest");<commit_msg>Complete - tasktune cactus_workflow's jobtree <commit_after>/*
 * sonLibKVDatabaseTest.c
 *
 */

#include "sonLibGlobalsTest.h"

static stKVDatabase *database = NULL;

static void teardown() {
    if (database != NULL) {
        stKVDatabase_deleteFromDisk(database);
        stKVDatabase_destruct(database);
        database = NULL;
    }
}

static stKVDatabaseConf *getConf() {
    static stKVDatabaseConf *conf = NULL;
    if (conf == NULL) {
#if 0
        conf = stKVDatabaseConf_constructTokyoCabinet("testTCDatabase");
        fprintf(stderr, "running Tokyo Cabinet sonLibKVDatabase tests\n");
#elif 1
        //host="localhost" port="0" user="root" password="" database_name="cactus"
        conf = stKVDatabaseConf_constructMySql("localhost", 0, "root", "", "cactus", "cactusDbTest");
        fprintf(stderr, "running MySQL local sonLibKVDatabase tests\n");
#else
        conf = stKVDatabaseConf_constructMySql("kolossus-10", 0, "cactus", "cactus", "cactus", "cactusDbTest");
{'fraction_non_alphanumeric': 0.1314019658561821, 'fraction_numerical': 0.007242628039317123, 'mean_word_length': 4.102902374670185, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '5692095', 'n_tokens_mistral': 655, 'n_tokens_neox': 665, 'n_words': 133}