Skip to content

Commit d5e1c64

Browse files
committed
Use tmpfs to mount MySQL data.
This approach to speed up database tests was suggested by https://www.fusonic.net/en/blog/fusonic-test-with-databases-part-3. Signed-off-by: Bradley Grainger <[email protected]>
1 parent 2f80198 commit d5e1c64

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

.ci/docker-run.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ docker run -d \
4040
-p $PORT:3306 \
4141
--name mysql \
4242
-e MYSQL_ROOT_PASSWORD='test' \
43+
--tmpfs /var/lib/mysql \
4344
$IMAGE \
4445
--log-bin-trust-function-creators=1 \
4546
--local-infile=1 \

tests/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ with Connector/NET and that [known bugs have been fixed](https://mysqlconnector.
77

88
The tests require a MySQL server. The simplest way to run one is with [Docker](https://www.docker.com/community-edition):
99

10-
docker run -d --rm --name mysqlconnector -e MYSQL_ROOT_PASSWORD=pass -p 3306:3306 mysql:8.0.27 --max-allowed-packet=96M --character-set-server=utf8mb4 --log-bin-trust-function-creators=1 --local-infile=1 --max-connections=250
10+
docker run -d --rm --name mysqlconnector -e MYSQL_ROOT_PASSWORD=pass -p 3306:3306 --tmpfs /var/lib/mysql mysql:8.0 --max-allowed-packet=96M --character-set-server=utf8mb4 --log-bin-trust-function-creators=1 --local-infile=1 --max-connections=250
1111

1212
Copy the file `SideBySide/config.json.example` to `SideBySide/config.json`, then edit
1313
the `config.json` file in order to connect to your server. If you are using the Docker

0 commit comments

Comments
 (0)