<commit_before>component extends="org.lucee.cfml.test.LuceeTestCase"{
		function beforeAll(){
		variables.uri = createURI("LDEV304");
	}
	// skip closure
	function isNotSupported() {
		var mySql = getCredentials();
		if(!isNull(mysql)){
			return false;
		} else{
			return true;
		}
	}

	function run( testResults , testBox ) {
		describe( "Test suite for LDEV-304", function() {
			it( title='Checking Query object does not return query result in cfquery', body=function( currentSpec ) {
				local.result = _InternalRequest(
					template:"#variables.uri#/test1.cfm");
				expect(result.filecontent.trim()).toBe("test");
			});
			it( title='Checking Query object does not return query result in query()', body=function( currentSpec ) {
				local.result = _InternalRequest(
					template:"#variables.uri#/test2.cfm");
				expect(result.filecontent.trim()).toBe("test");
			});
		});
	}

	private struct function getCredentials() {
		// getting the credentials from the enviroment variables
		var mySQL={};
		if(
			!isNull(server.system.environment.MYSQL_SERVER) &&
			!isNull(server.system.environment.MYSQL_USERNAME) &&
			!isNull(server.system.environment.MYSQL_PASSWORD) &&
			!isNull(server.system.environment.MYSQL_PORT) &&
			!isNull(server.system.environment.MYSQL_DATABASE)) {
			mySQL.server=server.system.environment.MYSQL_SERVER;
			mySQL.username=server.system.environment.MYSQL_USERNAME;
			mySQL.password=server.system.environment.MYSQL_PASSWORD;
			mySQL.port=server.system.environment.MYSQL_PORT;
			mySQL.database=server.system.environment.MYSQL_DATABASE;
		}
		// getting the credentials from the system variables
		else if(
			!isNull(server.system.properties.MYSQL_SERVER) &&
			!isNull(server.system.properties.MYSQL_USERNAME) &&
			!isNull(server.system.properties.MYSQL_PASSWORD) &&
			!isNull(server.system.properties.MYSQL_PORT) &&
			!isNull(server.system.properties.MYSQL_DATABASE)) {
			mySQL.server=server.system.properties.MYSQL_SERVER;
			mySQL.username=server.system.properties.MYSQL_USERNAME;
			mySQL.password=server.system.properties.MYSQL_PASSWORD;
			mySQL.port=server.system.properties.MYSQL_PORT;
			mySQL.database=server.system.properties.MYSQL_DATABASE;
		}
		return mysql;
	}
	
	private string function createURI(string calledName){
		var baseURI="/test/#listLast(getDirectoryFromPath(getCurrenttemplatepath()),"\/")#/";
		return baseURI&""&calledName;<commit_msg>Hot Fix<commit_after>component extends="org.lucee.cfml.test.LuceeTestCase"{
		function beforeAll(){
		variables.uri = createURI("LDEV304");
	}
	// skip closure
	function isMsSqlNotSupported() {
		var msSQL = msSqlCredentials();
		if(!isNull(msSQL)){
			return false;
		} else{
			return true;
		}
	}

	function run( testResults , testBox ) {
		describe( "Test suite for LDEV-304", function() {
			it( title='Checking Query object does not return query result in cfquery', skip=isMsSqlNotSupported(), body=function( currentSpec ) {
				local.result = _InternalRequest(
					template:"#variables.uri#/test1.cfm");
				expect(result.filecontent.trim()).toBe("test");
			});
			it( title='Checking Query object does not return query result in query()',skip=isMsSqlNotSupported(),  body=function( currentSpec ) {
				local.result = _InternalRequest(
					template:"#variables.uri#/test2.cfm");
				expect(result.filecontent.trim()).toBe("test");
			});
		});
	}

	private struct function msSqlCredentials() {
		// getting the credentials from the environment variables
		var msSQL={};
		if(isNull(server.system)){
			server.system = structNew();
			currSystem = createObject("java", "java.lang.System");
			server.system.environment = currSystem.getenv();
			server.system.properties = currSystem.getproperties();
		}

		if(
			!isNull(server.system.environment.MSSQL_SERVER) &&
			!isNull(server.system.environment.MSSQL_USERNAME) &&
			!isNull(server.system.environment.MSSQL_PASSWORD) &&
			!isNull(server.system.environment.MSSQL_PORT) &&
			!isNull(server.system.environment.MSSQL_DATABASE)) {
			msSQL.server=server.system.environment.MSSQL_SERVER;
			msSQL.username=server.system.environment.MSSQL_USERNAME;
			msSQL.password=<PASSWORD>;
			msSQL.port=server.system.environment.MSSQL_PORT;
			msSQL.database=server.system.environment.MSSQL_DATABASE;
		}
		// getting the credentials from the system variables
		else if(
			!isNull(server.system.properties.MSSQL_SERVER) &&
			!isNull(server.system.properties.MSSQL_USERNAME) &&
			!isNull(server.system.properties.MSSQL_PASSWORD) &&
			!isNull(server.system.properties.MSSQL_PORT) &&
			!isNull(server.system.properties.MSSQL_DATABASE)) {
			msSQL.server=server.system.properties.MSSQL_SERVER;
			msSQL.username=server.system.properties.MSSQL_USERNAME;
			msSQL.password=<PASSWORD>;
			msSQL.port=server.system.properties.MSSQL_PORT;
			msSQL.database=server.system.properties.MSSQL_DATABASE;
		}
		return msSQL;
	}
	
	private string function createURI(string calledName){
		var baseURI="/test/#listLast(getDirectoryFromPath(getCurrenttemplatepath()),"\/")#/";
		return baseURI&""&calledName;
{'fraction_non_alphanumeric': 0.1351672273896695, 'fraction_numerical': 0.003166435780724322, 'mean_word_length': 4.904205607476635, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '5867477', 'n_tokens_mistral': 1830, 'n_tokens_neox': 1630, 'n_words': 245}