From 774c7311f2e8a1af608b8258437ece78c5d749dd Mon Sep 17 00:00:00 2001 From: Vinai Rachakonda Date: Fri, 18 Mar 2022 11:15:31 -0700 Subject: [PATCH] Pin the version of mysqlfw, add a comment, and a check to stop postgres (#3030) --- integration-tests/MySQLDockerfile | 2 +- .../mysql-client-tests/c/mysql-connector-c-test.c | 1 + .../mysql-client-tests/mysql-client-tests.bats | 6 ++++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/integration-tests/MySQLDockerfile b/integration-tests/MySQLDockerfile index 215643ab33..6230914925 100644 --- a/integration-tests/MySQLDockerfile +++ b/integration-tests/MySQLDockerfile @@ -106,7 +106,7 @@ RUN service postgresql start # install mysql_fdw WORKDIR /mysql-client-tests/mysql_fdw -RUN git clone https://github.com/EnterpriseDB/mysql_fdw +RUN git clone https://github.com/EnterpriseDB/mysql_fdw --branch REL-2_7_0 WORKDIR /mysql-client-tests/mysql_fdw/mysql_fdw RUN make USE_PGXS=1 && \ make USE_PGXS=1 install diff --git a/integration-tests/mysql-client-tests/c/mysql-connector-c-test.c b/integration-tests/mysql-client-tests/c/mysql-connector-c-test.c index 4026aa5edd..bfe1bbdf23 100644 --- a/integration-tests/mysql-client-tests/c/mysql-connector-c-test.c +++ b/integration-tests/mysql-client-tests/c/mysql-connector-c-test.c @@ -63,6 +63,7 @@ void test_statement(MYSQL *con, statement *stmt) { exit(1); } } + // TODO: Add test for mysql_stmt_store_result when supported close: if ( mysql_stmt_close(mstmt) ) { fprintf(stderr, "failed to close stmt: %s: %s\n", stmt->query, mysql_error(con)); diff --git a/integration-tests/mysql-client-tests/mysql-client-tests.bats b/integration-tests/mysql-client-tests/mysql-client-tests.bats index 36ca156534..69d7942997 100644 --- a/integration-tests/mysql-client-tests/mysql-client-tests.bats +++ b/integration-tests/mysql-client-tests/mysql-client-tests.bats @@ -33,6 +33,12 @@ teardown() { cd .. kill $SERVER_PID rm -rf $REPO_NAME + + # Check if postgresql is still running. If so stop it + active=$(service postgresql status) + if echo "$active" | grep "online"; then + service postgresql stop + fi } @test "go go-sql-drive/mysql test" {