<commit_before>/*
 *     This file is part of ToroDB.
 *
 *     ToroDB is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Affero General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     ToroDB is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Affero General Public License for more details.
 *
 *     You should have received a copy of the GNU Affero General Public License
 *     along with ToroDB. If not, see <http://www.gnu.org/licenses/>.
 *
 *     Copyright (c) 2014, 8Kdata Technology
 *     
 */

package com.torodb.integration.mongo.v3m0.jstests;

import static com.torodb.integration.TestCategory.CATASTROPHIC;
import static com.torodb.integration.TestCategory.WORKING;

import java.net.URL;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.torodb.integration.mongo.v3m0.jstests.ScriptClassifier.Builder;

import static com.torodb.integration.Protocol.MONGO;
import static com.torodb.integration.Protocol.MONGO_REPL_SET;
import static com.torodb.integration.Backend.POSTGRES;
import static com.torodb.integration.Backend.DERBY;


@RunWith(Parameterized.class)
public class CustomParallelIT extends AbstractIntegrationParallelTest {
    private static final Logger LOGGER = LoggerFactory.getLogger(CustomParallelIT.class);

	public CustomParallelIT() {
		super(LOGGER);
	}
	
	@Parameters(name="{0}-{1}")
	public static Collection<Object[]> parameters() {
		return parameters(createScriptClassifier());
	}

    private static ScriptClassifier createScriptClassifier() {
        return new Builder()
                .addScripts(MONGO, POSTGRES, WORKING, asScriptSet("updaterace.js", 8))
                
                .addScripts(MONGO, DERBY, CATASTROPHIC, asScriptSet("updaterace.js", 4))
                
                .addScripts(MONGO_REPL_SET, POSTGRES, CATASTROPHIC, asScriptSet("updaterace.js", 8))
                
                .build();
    }

    private static Set<Script> asScriptSet(String scriptName, int threads) {
        return asScriptSet(new String[] {scriptName}, threads);
    }

    private static Set<Script> asScriptSet(String[] scriptNames, int threads) {
        HashSet<Script> result = new HashSet<>(scriptNames.length);
        for (String scriptName : scriptNames) {
            String relativePath = "custom_parallel/" + scriptName;
            result.add(new Script(relativePath, createURL(relativePath), threads));
        }

        return result;
    }<commit_msg>Changed test category to NOT_IMPLEMENTED.<commit_after>/*
 *     This file is part of ToroDB.
 *
 *     ToroDB is free software: you can redistribute it and/or modify
 *     it under the terms of the GNU Affero General Public License as published by
 *     the Free Software Foundation, either version 3 of the License, or
 *     (at your option) any later version.
 *
 *     ToroDB is distributed in the hope that it will be useful,
 *     but WITHOUT ANY WARRANTY; without even the implied warranty of
 *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *     GNU Affero General Public License for more details.
 *
 *     You should have received a copy of the GNU Affero General Public License
 *     along with ToroDB. If not, see <http://www.gnu.org/licenses/>.
 *
 *     Copyright (c) 2014, 8Kdata Technology
 *     
 */

package com.torodb.integration.mongo.v3m0.jstests;

import static com.torodb.integration.TestCategory.NOT_IMPLEMENTED;
import static com.torodb.integration.TestCategory.WORKING;

import java.net.URL;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;

import org.junit.runner.RunWith;
import org.junit.runners.Parameterized;
import org.junit.runners.Parameterized.Parameters;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import com.torodb.integration.TestCategory;
import com.torodb.integration.mongo.v3m0.jstests.ScriptClassifier.Builder;

import static com.torodb.integration.Protocol.MONGO;
import static com.torodb.integration.Protocol.MONGO_REPL_SET;
import static com.torodb.integration.Backend.POSTGRES;
import static com.torodb.integration.Backend.DERBY;


@RunWith(Parameterized.class)
public class CustomParallelIT extends AbstractIntegrationParallelTest {
    private static final Logger LOGGER = LoggerFactory.getLogger(CustomParallelIT.class);

	public CustomParallelIT() {
		super(LOGGER);
	}
	
	@Parameters(name="{0}-{1}")
	public static Collection<Object[]> parameters() {
		return parameters(createScriptClassifier());
	}

    private static ScriptClassifier createScriptClassifier() {
        return new Builder()
                .addScripts(MONGO, POSTGRES, NOT_IMPLEMENTED, asScriptSet("updaterace.js", 8))
                
                .addScripts(MONGO, DERBY, NOT_IMPLEMENTED, asScriptSet("updaterace.js", 4))
                
                .addScripts(MONGO_REPL_SET, POSTGRES, NOT_IMPLEMENTED, asScriptSet("updaterace.js", 8))
                
                .build();
    }

    private static Set<Script> asScriptSet(String scriptName, int threads) {
        return asScriptSet(new String[] {scriptName}, threads);
    }

    private static Set<Script> asScriptSet(String[] scriptNames, int threads) {
        HashSet<Script> result = new HashSet<>(scriptNames.length);
        for (String scriptName : scriptNames) {
            String relativePath = "custom_parallel/" + scriptName;
            result.add(new Script(relativePath, createURL(relativePath), threads));
        }

        return result;
    }
{'fraction_non_alphanumeric': 0.09106154620157639, 'fraction_numerical': 0.0057018279389569005, 'mean_word_length': 3.4408041697691734, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5568274', 'n_tokens_mistral': 1776, 'n_tokens_neox': 1708, 'n_words': 472}