<commit_before>component {
	pgSQL = getCredentials();
    this.name = "test3426";
    this.datasources["LDEV_3426"] = pgSQL;
	this.datasource = "LDEV_3426"
    public function onRequestStart(){
		query{
			echo("DROP TABLE IF EXISTS LDEV3426_Primary");
		}
        query{
			echo("DROP TABLE IF EXISTS LDEV3426_test");
		}
		query{
			echo("CREATE TABLE LDEV3426_Primary( id SERIAL NOT NULL PRIMARY KEY, test VARCHAR(50))");
		}
	}
    private struct function getCredentials() {
    	return server.getDatasource("postgres");
	}
    public function onRequestEnd(){
		query{
			echo("DROP TABLE IF EXISTS LDEV3426_Primary");
		}
	}
}<commit_msg>Update the testcase to check datasource credentials available or not<commit_after>component {
    pgSQL = getCredentials();
    this.name = "test3426";
    this.datasources["LDEV_3426"] = pgSQL;
    this.datasource = "LDEV_3426"
    public function onRequestStart(){
        if( StructIsEmpty(pgSQL) ){
            writeoutput("Datasource credentials was not available"); // Datasource credentials was not available means need to stop the iterations.
            abort;
        }
        query{
        echo("DROP TABLE IF EXISTS LDEV3426_test");
        }
        query{
            echo("DROP TABLE IF EXISTS LDEV3426_Primary");
        }
        query{
            echo("CREATE TABLE LDEV3426_Primary( id SERIAL NOT NULL PRIMARY KEY, test VARCHAR(50))");
        }
    }
    private struct function getCredentials() {
        return server.getDatasource("postgres");
    }
    public function onRequestEnd(){
        if( StructIsEmpty(pgSQL) ) return;
        query{
            echo("DROP TABLE IF EXISTS LDEV3426_test");
        }
        query{
            echo("DROP TABLE IF EXISTS LDEV3426_Primary");
        }
    }
}
{'fraction_non_alphanumeric': 0.10112994350282486, 'fraction_numerical': 0.03615819209039548, 'mean_word_length': 2.705020920502092, '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': '4136809', 'n_tokens_mistral': 594, 'n_tokens_neox': 533, 'n_words': 139}