Skip to content

Commit b7ab212

Browse files
committed
ci: add TLS showcase server instance to dependency compatibility test workflow
1 parent 1a82a7c commit b7ab212

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

.github/workflows/sdk-platform-java-dependency_compatibility_test.yaml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,22 @@ jobs:
9090
curl --location https://github.com/googleapis/gapic-showcase/releases/download/v${SHOWCASE_VERSION}/gapic-showcase-${SHOWCASE_VERSION}-linux-amd64.tar.gz --output /usr/src/showcase/showcase-${SHOWCASE_VERSION}-linux-amd64.tar.gz
9191
cd /usr/src/showcase/
9292
tar -xf showcase-*
93+
# Start standard insecure showcase server on default port 7469 for standard integration tests
9394
./gapic-showcase run &
95+
# Start secure TLS showcase server on port 7470 for PQC TLS integration tests
96+
./gapic-showcase run --port 7470 --tls --ca-cert-output-file /tmp/showcase-ca.pem &
97+
# Wait deterministically for both background showcase servers to finish binding ports 7469/7470
98+
# and writing /tmp/showcase-ca.pem. Starting TLS requires RSA key generation and disk I/O,
99+
# which can cause race conditions if tests start before /tmp/showcase-ca.pem is created.
100+
for i in $(seq 1 30); do
101+
if (echo > /dev/tcp/127.0.0.1/7469) 2>/dev/null && \
102+
(echo > /dev/tcp/127.0.0.1/7470) 2>/dev/null && \
103+
[ -f /tmp/showcase-ca.pem ]; then
104+
echo "Showcase servers (ports 7469, 7470) and CA cert ready in attempt $i."
105+
break
106+
fi
107+
sleep 0.2
108+
done
94109
cd -
95110
working-directory: sdk-platform-java
96111

0 commit comments

Comments
 (0)