File tree Expand file tree Collapse file tree 3 files changed +23
-22
lines changed
src/test/java/io/asyncer/r2dbc/mysql Expand file tree Collapse file tree 3 files changed +23
-22
lines changed Original file line number Diff line number Diff line change @@ -22,10 +22,15 @@ jobs:
2222 - name : Shutdown the Default MySQL
2323 run : sudo service mysql stop
2424 - name : Set up MySQL ${{ matrix.mysql-version }}
25- uses : asyncer-io/mysql-action@trunk
26- with :
27- mysql version : ${{ matrix.mysql-version }}
28- mysql database : r2dbc
29- mysql root password : r2dbc-password!@
25+ env :
26+ MYSQL_DATABASE : r2dbc
27+ MYSQL_ROOT_PASSWORD : r2dbc-password!@
28+ MYSQL_VERSION : ${{ matrix.mysql-version }}
29+ run : docker-compose -f ${{ github.workspace }}/containers/mysql-compose.yml up -d
3030 - name : Integration test with MySQL ${{ matrix.mysql-version }}
31- run : ./mvnw -B verify -Dmaven.javadoc.skip=true -Dmaven.surefire.skip=true -Dtest.mysql.password=r2dbc-password!@ -Dtest.mysql.version=${{ matrix.mysql-version }} -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
31+ run : |
32+ ./mvnw -B verify -Dmaven.javadoc.skip=true \
33+ -Dmaven.surefire.skip=true \
34+ -Dtest.mysql.password=r2dbc-password!@ \
35+ -Dtest.mysql.version=${{ matrix.mysql-version }} \
36+ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
Original file line number Diff line number Diff line change 1+ version : " 3"
2+
3+ services :
4+ mariadb :
5+ image : mysql:${MYSQL_VERSION}
6+ container_name : mysql_${MYSQL_VERSION}
7+ environment :
8+ MYSQL_ROOT_PASSWORD : ${MYSQL_ROOT_PASSWORD}
9+ MYSQL_DATABASE : ${MYSQL_DATABASE}
10+ command : mysqld --local-infile=true --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
11+ ports :
12+ - " 3306:3306"
Original file line number Diff line number Diff line change 1818
1919import io .r2dbc .spi .ColumnMetadata ;
2020import io .r2dbc .spi .R2dbcPermissionDeniedException ;
21- import org .junit .jupiter .api .BeforeAll ;
2221import org .junit .jupiter .api .Test ;
2322import org .junit .jupiter .params .ParameterizedTest ;
2423import org .junit .jupiter .params .provider .ValueSource ;
2827import org .testcontainers .shaded .com .fasterxml .jackson .databind .node .ObjectNode ;
2928import reactor .core .publisher .Flux ;
3029import reactor .core .publisher .Mono ;
31- import reactor .test .StepVerifier ;
3230
3331import java .io .IOException ;
3432import java .net .URISyntaxException ;
@@ -62,20 +60,6 @@ class ConnectionIntegrationTest extends IntegrationTestSupport {
6260 super (config );
6361 }
6462
65- @ BeforeAll
66- static void initGlobalVariables () {
67- // TODO: move it to GitHub Actions instead of test code
68- MySqlConnectionFactory .from (config )
69- .create ()
70- .flatMap (conn -> conn .createStatement ("SET GLOBAL local_infile=ON" )
71- .execute ()
72- .flatMap (MySqlResult ::getRowsUpdated )
73- .then (conn .close ())
74- .onErrorResume (e -> conn .close ().then (Mono .error (e ))))
75- .as (StepVerifier ::create )
76- .verifyComplete ();
77- }
78-
7963 @ Test
8064 void isInTransaction () {
8165 complete (connection -> Mono .<Void >fromRunnable (() -> assertThat (connection .isInTransaction ())
You can’t perform that action at this time.
0 commit comments