File tree Expand file tree Collapse file tree 5 files changed +51
-3
lines changed
r2dbc-mysql/src/test/resources Expand file tree Collapse file tree 5 files changed +51
-3
lines changed Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ #
3+ # Copyright 2024 asyncer.io projects
4+ #
5+ # Licensed under the Apache License, Version 2.0 (the "License");
6+ # you may not use this file except in compliance with the License.
7+ # You may obtain a copy of the License at
8+ #
9+ # https://www.apache.org/licenses/LICENSE-2.0
10+ #
11+ # Unless required by applicable law or agreed to in writing, software
12+ # distributed under the License is distributed on an "AS IS" BASIS,
13+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14+ # See the License for the specific language governing permissions and
15+ # limitations under the License.
16+ #
17+ set -e
18+
19+ if [ " $# " -ne 1 ] || [ " ${1##* .} " != " log" ]; then
20+ echo " Please provide a single log file with a .log extension."
21+ exit 1
22+ fi
23+
24+ if grep -q ' LEAK' " $1 " ; then
25+ echo " LEAK FOUND: The log file $1 contains a memory leak."
26+ exit 1
27+ fi
28+
29+ echo " No Leak: The log file $1 does not contain any memory leaks."
30+ exit 0
Original file line number Diff line number Diff line change 3333 -Dmaven.surefire.skip=true \
3434 -Dtest.mysql.password=r2dbc-password!@ \
3535 -Dtest.mysql.version=${{ matrix.mysql-version }} \
36- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
36+ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN \
37+ -Dio.netty.leakDetectionLevel=paranoid \
38+ -Dio.netty.leakDetection.targetRecords=32 \
39+ | tee test.log
40+ - name : ensure no leaks
41+ run : ./.github/scripts/ensure_no_leak.sh test.log
Original file line number Diff line number Diff line change 3434 -Dtest.mysql.password=r2dbc-password!@ \
3535 -Dtest.mysql.version=${{ matrix.mariadb-version }} \
3636 -Dtest.db.type=mariadb \
37- -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
37+ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN \
38+ -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN \
39+ -Dio.netty.leakDetectionLevel=paranoid \
40+ -Dio.netty.leakDetection.targetRecords=32 \
41+ | tee test.log
42+ - name : ensure no leaks
43+ run : ./.github/scripts/ensure_no_leak.sh test.log
Original file line number Diff line number Diff line change 2020 java-version : ${{ matrix.java-version }}
2121 cache : maven
2222 - name : Unit test with Maven
23- run : ./mvnw -B test -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN
23+ run : |
24+ ./mvnw -B test -Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=WARN \
25+ -Dio.netty.leakDetectionLevel=paranoid \
26+ -Dio.netty.leakDetection.targetRecords=32 \
27+ | tee test.log
28+ - name : ensure no leaks
29+ run : ./.github/scripts/ensure_no_leak.sh test.log
Original file line number Diff line number Diff line change 2626 <logger name =" org.testcontainers" level =" INFO" />
2727 <logger name =" reactor.netty" level =" INFO" />
2828 <logger name =" com.zaxxer.hikari" level =" WARN" />
29+ <logger name =" io.netty" level =" WARN" />
2930
3031 <root level =" INFO" >
3132 <appender-ref ref =" STDOUT" />
You can’t perform that action at this time.
0 commit comments