diff --git a/test/tap/tests/test_binlog_reader-t.cpp b/test/tap/tests/test_binlog_reader-t.cpp index cebe4fab0..7a63a07ed 100644 --- a/test/tap/tests/test_binlog_reader-t.cpp +++ b/test/tap/tests/test_binlog_reader-t.cpp @@ -46,6 +46,7 @@ using std::map; using nlohmann::json; int create_testing_tables(MYSQL* mysql_server) { + diag("Creating testing tables..."); // Create the testing database MYSQL_QUERY(mysql_server, "CREATE DATABASE IF NOT EXISTS test"); MYSQL_QUERY(mysql_server, "DROP TABLE IF EXISTS test.gtid_test"); @@ -65,6 +66,7 @@ int create_testing_tables(MYSQL* mysql_server) { } int insert_random_data(MYSQL* proxysql_mysql, uint32_t rows) { + diag("Inserting %u rows of random data...", rows); int rnd_a = rand() % 1000; string rnd_c = random_string(rand() % 100 + 5); string rnd_pad = random_string(rand() % 50 + 5); @@ -126,6 +128,7 @@ map> extract_hosgtroups_stats(const vector reader_2_read {}; // Reset connection pool stats + diag("Resetting connection pool stats..."); int rc = mysql_query(proxysql_admin, "SELECT * FROM stats.stats_mysql_connection_pool_reset"); if (rc != EXIT_SUCCESS) { goto cleanup; } mysql_free_result(mysql_store_result(proxysql_admin)); @@ -276,6 +297,7 @@ int main(int argc, char** argv) { rc = insert_random_data(proxysql_mysql, NUM_ROWS); if (rc != EXIT_SUCCESS) { goto cleanup; } + diag("Performing %u update/select pairs...", NUM_CHECKS); for (uint32_t i = 0; i < NUM_CHECKS; i++) { rc = perform_update(proxysql_mysql, NUM_ROWS); if (rc != EXIT_SUCCESS) { goto cleanup; } @@ -339,5 +361,6 @@ cleanup: mysql_close(proxysql_mysql); mysql_close(proxysql_admin); + diag("Test completed"); return exit_status(); } diff --git a/test/tap/tests/test_com_register_slave_enables_fast_forward-t.cpp b/test/tap/tests/test_com_register_slave_enables_fast_forward-t.cpp index 670a3bf7d..16acaa95b 100644 --- a/test/tap/tests/test_com_register_slave_enables_fast_forward-t.cpp +++ b/test/tap/tests/test_com_register_slave_enables_fast_forward-t.cpp @@ -18,15 +18,25 @@ int main(int argc, char** argv) { plan(1); + diag("Testing COM_REGISTER_SLAVE enables fast forward"); + diag("This test verifies that ProxySQL correctly enables fast forward for a user when it receives COM_REGISTER_SLAVE, even if it was initially disabled."); + const char * tdp = getenv("TEST_DEPS"); const std::string test_binlog_reader = ( tdp == nullptr || *tdp == '\0' ) ? "./test_binlog_reader-t" : std::string(tdp) + "/test_binlog_reader-t"; + diag("Executing test_binlog_reader-t from: %s", test_binlog_reader.c_str()); const int test_binlog_reader_res = system(test_binlog_reader.c_str()); + + if (test_binlog_reader_res != 0) { + diag("test_binlog_reader-t failed with exit code: %d", test_binlog_reader_res); + } + ok( test_binlog_reader_res == 0, "'test_binlog_reader-t' should be correctly executed. Err code was: %d", test_binlog_reader_res ); + diag("Test completed"); return exit_status(); }