Skip to content

Commit 09a68a2

Browse files
authored
ci: fix flaky interning test (#4334)
1 parent ea62545 commit 09a68a2

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

codebuild/bin/test_libcrypto_interning.sh

+10-2
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,13 @@ done
147147

148148
run_connection_test() {
149149
local TARGET="$1"
150+
150151
LD_PRELOAD=$OPENSSL_1_0/lib/libcrypto.so ./build/$TARGET/bin/s2nd -c default_tls13 localhost 4433 &> /dev/null &
151152
local SERVER_PID=$!
153+
154+
# Wait for the server to start up before connecting
155+
sleep 5s
156+
152157
LD_PRELOAD=$OPENSSL_1_0/lib/libcrypto.so ./build/$TARGET/bin/s2nc -i -c default_tls13 localhost 4433 | tee build/client.log
153158
kill $SERVER_PID &> /dev/null || true
154159

@@ -158,11 +163,14 @@ run_connection_test() {
158163
}
159164

160165
# without interning, the connection should fail when linking the wrong version of libcrypto
161-
echo "running pair: TLS 1.3 failure expected"
166+
echo "Running test: attempt TLS1.3 handshake without interning"
162167
run_connection_test shared-default && fail "TLS 1.3 handshake was expected to fail"
168+
echo "TLS1.3 handshake failed as expected"
169+
echo ""
163170

164171
# with interning, the connection should succeed even though we've linked the wrong version of libcrypto
165-
echo "running pair: TLS 1.3 success expected"
172+
echo "Running test: attempt TLS1.3 handshake with interning"
166173
run_connection_test shared-testing || fail "TLS 1.3 handshake was expected to succeed"
174+
echo "TLS1.3 handshake succeeded as expected"
167175

168176
echo "SUCCESS!"

0 commit comments

Comments
 (0)