Skip to content

Commit 901356d

Browse files
authored
fix: bump pskel 3.1.2 (#31)
* fix: bump pskel 3.1.2 * fix * fix * increase attempt
1 parent 5b852d0 commit 901356d

File tree

8 files changed

+63
-7
lines changed

8 files changed

+63
-7
lines changed

.github/workflows/ci_coverage.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ jobs:
8888
run: |
8989
docker compose build \
9090
--build-arg TAG="${{ matrix.versions }}-${{ matrix.ts }}" \
91+
--build-arg SKIP_VALGRIND=1 \
9192
shell
9293
touch "lcov.info"
9394
docker compose run -v "$(pwd)/lcov.info:/ext/lcov.info" --rm shell pskel coverage

.github/workflows/ci_native_linux.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ jobs:
6666
if: matrix.version != '8.1'
6767
run: docker compose run --rm -v "$(pwd)/php-cache:/opt/php-cache" -e PHP_CACHE_DIR="/opt/php-cache" -e GITHUB_ACTIONS="true" -e CONTAINER_IMAGE_HASH="${{ steps.pull-image.outputs.image_hash }}" shell pskel test debug
6868
- name: Test extension with Valgrind
69-
if: matrix.version != '8.1'
69+
if: matrix.distro != 'alpine' && matrix.version != '8.1'
7070
run: docker compose run --rm -v "$(pwd)/php-cache:/opt/php-cache" -e PHP_CACHE_DIR="/opt/php-cache" -e GITHUB_ACTIONS="true" -e CONTAINER_IMAGE_HASH="${{ steps.pull-image.outputs.image_hash }}" shell pskel test valgrind
7171
- name: Test extension with LLVM Sanitizer (MemorySanitizer)
7272
if: matrix.distro != 'alpine' && matrix.version != '8.1'

.github/workflows/ci_prepare.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ on:
1212
archive_name:
1313
description: Name of the tar.gz workspace archive
1414
value: ${{ jobs.prepare.outputs.archive_name }}
15-
1615
jobs:
1716
prepare:
1817
runs-on: ubuntu-24.04

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ RUN docker-php-source extract \
4949

5050
COPY ./third_party/valgrind "/third_party/valgrind"
5151
ARG SKIP_VALGRIND
52-
RUN if test "${SKIP_VALGRIND}" != "1"; then \
52+
RUN if test "${SKIP_VALGRIND}" != "1" && test -f "/etc/debian_version"; then \
5353
cd "/third_party/valgrind" && \
5454
if test -f "/etc/debian_version"; then \
5555
apt-get update && \

ext/tests/classes/pdo/mysql/exec_doer.phpt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ $before = new \DateTimeImmutable();
1616

1717
\Colopl\ColoplTimeShifter\register_hook($shift_interval);
1818

19-
$pdo = new \PDO('mysql:dbname=testing;host=mysql', 'testing', 'testing');
19+
$pdo = (static function () {
20+
$attempt = 0;
21+
$delay = 100000;
22+
while (true) {
23+
try {
24+
return new \PDO('mysql:dbname=testing;host=mysql', 'testing', 'testing');
25+
} catch (\PDOException $exception) {
26+
if (++$attempt >= 10) {
27+
throw $exception;
28+
}
29+
}
30+
usleep($delay);
31+
$delay *= 2;
32+
}
33+
})();
2034

2135
$pdo->exec('DROP TABLE IF EXISTS testing;');
2236
$pdo->exec('CREATE TABLE IF NOT EXISTS testing (

ext/tests/classes/pdo/mysql/exec_doer_tidb.phpt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@ $before = new \DateTimeImmutable();
1414

1515
\Colopl\ColoplTimeShifter\register_hook($shift_interval);
1616

17-
$pdo = new \PDO('mysql:dbname=mysql;host=tidb;port=4000', 'root', '');
17+
$pdo = (static function () {
18+
$attempt = 0;
19+
$delay = 100000;
20+
while (true) {
21+
try {
22+
return new \PDO('mysql:dbname=mysql;host=tidb;port=4000', 'root', '');
23+
} catch (\PDOException $exception) {
24+
if (++$attempt >= 10) {
25+
throw $exception;
26+
}
27+
}
28+
usleep($delay);
29+
$delay *= 2;
30+
}
31+
})();
1832

1933
$pdo->exec('CREATE DATABASE IF NOT EXISTS testing;');
2034
$pdo->exec('USE testing;');

ext/tests/classes/pdo/mysql/query_preparer.phpt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,21 @@ $before = new \DateTimeImmutable();
1616

1717
\Colopl\ColoplTimeShifter\register_hook($shift_interval);
1818

19-
$pdo = new \PDO('mysql:host=mysql', 'testing', 'testing');
19+
$pdo = (static function () {
20+
$attempt = 0;
21+
$delay = 100000;
22+
while (true) {
23+
try {
24+
return new \PDO('mysql:host=mysql', 'testing', 'testing');
25+
} catch (\PDOException $exception) {
26+
if (++$attempt >= 10) {
27+
throw $exception;
28+
}
29+
}
30+
usleep($delay);
31+
$delay *= 2;
32+
}
33+
})();
2034

2135
/* NOW(), CURRENT_TIMESTAMP, CURRENT_TIMESTAMP(), UTC_TIMESTAMP() */
2236
foreach ($pdo->query('

ext/tests/classes/pdo/mysql/query_preparer_tidb.phpt

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,21 @@ $before = new \DateTimeImmutable();
1414

1515
\Colopl\ColoplTimeShifter\register_hook($shift_interval);
1616

17-
$pdo = new \PDO('mysql:dbname=mysql;host=tidb;port=4000', 'root', '');
17+
$pdo = (static function () {
18+
$attempt = 0;
19+
$delay = 100000;
20+
while (true) {
21+
try {
22+
return new \PDO('mysql:dbname=mysql;host=tidb;port=4000', 'root', '');
23+
} catch (\PDOException $exception) {
24+
if (++$attempt >= 10) {
25+
throw $exception;
26+
}
27+
}
28+
usleep($delay);
29+
$delay *= 2;
30+
}
31+
})();
1832
$pdo->exec('CREATE DATABASE IF NOT EXISTS testing;');
1933
$pdo->exec('USE testing;');
2034

0 commit comments

Comments
 (0)