<commit_before>// Version: $Id$
//
//

// Commentary:
//
//

// Change Log:
//
//

// Code:

#include "dtkDistributedGraphTopologyTest.h"
#include "../dtkDistributedGraphTopologyRunnable.h"

#include <dtkDistributed>
#include <dtkDistributed/dtkDistributedPolicy>

void dtkDistributedGraphTopologyTestCase::initTestCase(void)
{
    dtkDistributedSettings settings;
    settings.beginGroup("communicator");
    dtkDistributed::communicator::initialize(settings.value("plugins").toString());
    settings.endGroup();

    dtkDistributed::policy()->setType("mpi");

    for (int i = 0; i < 3; ++i) {
        dtkDistributed::policy()->addHost("localhost");
    }

    dtkDistributed::spawn();
}

void dtkDistributedGraphTopologyTestCase::init(void)
{

}

void dtkDistributedGraphTopologyTestCase::testCreateDestroy(void)
{
    QRunnable *test = new testGraphTopologyCreateDestroy();
    dtkDistributed::exec(test);
    delete test;
}

void dtkDistributedGraphTopologyTestCase::testClearResize(void)
{
    QRunnable *test = new testGraphTopologyClearResize();
    dtkDistributed::exec(test);
    delete test;<commit_msg>do not use mpi in tests<commit_after>// Version: $Id$
//
//

// Commentary:
//
//

// Change Log:
//
//

// Code:

#include "dtkDistributedGraphTopologyTest.h"
#include "../dtkDistributedGraphTopologyRunnable.h"

#include <dtkDistributed>
#include <dtkDistributed/dtkDistributedPolicy>

void dtkDistributedGraphTopologyTestCase::initTestCase(void)
{
    dtkDistributedSettings settings;
    settings.beginGroup("communicator");
    dtkDistributed::communicator::initialize(settings.value("plugins").toString());
    settings.endGroup();

    dtkDistributed::policy()->setType("qthread");

    for (int i = 0; i < 3; ++i) {
        dtkDistributed::policy()->addHost("localhost");
    }

    dtkDistributed::spawn();
}

void dtkDistributedGraphTopologyTestCase::init(void)
{

}

void dtkDistributedGraphTopologyTestCase::testCreateDestroy(void)
{
    QRunnable *test = new testGraphTopologyCreateDestroy();
    dtkDistributed::exec(test);
    delete test;
}

void dtkDistributedGraphTopologyTestCase::testClearResize(void)
{
    QRunnable *test = new testGraphTopologyClearResize();
    dtkDistributed::exec(test);
    delete test;
{'fraction_non_alphanumeric': 0.13814616755793227, 'fraction_numerical': 0.0017825311942959, 'mean_word_length': 5.0675675675675675, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 11, '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': '2500991', 'n_tokens_mistral': 733, 'n_tokens_neox': 710, 'n_words': 108}