<commit_before>import Services.CliCommandsGeneratorHelper
import Models.JBoss.Domain.ServerHelper
import Utils.EnvPropertiesHelper
import spock.lang.*
import Utils.EnvPropertiesHelper

@Requires({ env.JBOSS_TOPOLOGY == 'master_slave' })
class StopDomain extends PluginTestHelper {

	@Shared
	String procName = 'StopDomain'
	@Shared
    String projectName = "EC-JBoss Specs $procName Project"
    @Shared
    String defaultConfigName = 'specConfig'
    @Shared
    String defaultWaitTime = '100'
    @Shared
    def resName
    @Shared
    def resSlaveName
    @Shared
    def serverNames = [
        [Name: 'server-one', Host: 'master'], 
        [Name: 'server-two', Host: 'master'], 
        [Name: 'server-three', Host: 'master'],
        [Name: 'server-one', Host: 'jbossslave1'], 
        [Name: 'server-two', Host: 'jbossslave1']]

    def doSetupSpec() {
        logger.info("Hello World! doSetupSpec")
        redirectLogs()
        createDefaultConfiguration(defaultConfigName)
        resName = createJBossResource()
        resSlaveName = createJBossResource('slave')
        dslFile 'dsl/RunProcedure.dsl', [
                projName: projectName,
                resName : resName,
                procName: procName,
                params  : [
                        serverconfig     		: '',
                        allControllersShutdown  : '',
                        jbossTimeout        	: '',

                ]
        ]

        createHelperProject(resName, defaultConfigName)
    }

    def doCleanupSpec() {
        logger.info("Hello World! doCleanupSpec")
        // deleteProject(projectName)
        deleteConfiguration("EC-JBoss", defaultConfigName)
    }

    RunProcedureJob runProcedureUnderTest(def parameters) {
        return runProcedureDsl(projectName, procName, parameters)
    }    

    @Timeout(4000)
    @Unroll
    def "StopDomain, with minimum parameters (no wait time - undef) (C289387)"() {
    	String testCaseId = "C289387"
        def serverGroupName = "default"
        
        def runParams = [
    		            serverconfig     		: defaultConfigName,
                        allControllersShutdown  : '',<commit_msg>uncommented<commit_after>import Services.CliCommandsGeneratorHelper
import Models.JBoss.Domain.ServerHelper
import Utils.EnvPropertiesHelper
import spock.lang.*
import Utils.EnvPropertiesHelper

@Requires({ env.JBOSS_TOPOLOGY == 'master_slave' })
class StopDomain extends PluginTestHelper {

	@Shared
	String procName = 'StopDomain'
	@Shared
    String projectName = "EC-JBoss Specs $procName Project"
    @Shared
    String defaultConfigName = 'specConfig'
    @Shared
    String defaultWaitTime = '100'
    @Shared
    def resName
    @Shared
    def resSlaveName
    @Shared
    def serverNames = [
        [Name: 'server-one', Host: 'master'], 
        [Name: 'server-two', Host: 'master'], 
        [Name: 'server-three', Host: 'master'],
        [Name: 'server-one', Host: 'jbossslave1'], 
        [Name: 'server-two', Host: 'jbossslave1']]

    def doSetupSpec() {
        logger.info("Hello World! doSetupSpec")
        redirectLogs()
        createDefaultConfiguration(defaultConfigName)
        resName = createJBossResource()
        resSlaveName = createJBossResource('slave')
        dslFile 'dsl/RunProcedure.dsl', [
                projName: projectName,
                resName : resName,
                procName: procName,
                params  : [
                        serverconfig     		: '',
                        allControllersShutdown  : '',
                        jbossTimeout        	: '',

                ]
        ]

        createHelperProject(resName, defaultConfigName)
    }

    def doCleanupSpec() {
        logger.info("Hello World! doCleanupSpec")
        deleteProject(projectName)
        deleteConfiguration("EC-JBoss", defaultConfigName)
    }

    RunProcedureJob runProcedureUnderTest(def parameters) {
        return runProcedureDsl(projectName, procName, parameters)
    }    

    @Timeout(4000)
    @Unroll
    def "StopDomain, with minimum parameters (no wait time - undef) (C289387)"() {
    	String testCaseId = "C289387"
        def serverGroupName = "default"
        
        def runParams = [
    		            serverconfig     		: defaultConfigName,
                        allControllersShutdown  : '',
{'fraction_non_alphanumeric': 0.09688581314878893, 'fraction_numerical': 0.009688581314878892, 'mean_word_length': 2.2406576980568014, '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': '4704046', 'n_tokens_mistral': 1286, 'n_tokens_neox': 1195, 'n_words': 256}