Files
Ryan El KochtaandgVisor bot 780b588b8f nodejs tests: increase timeouts
Seems these tests are the most common flake we have.

PiperOrigin-RevId: 966166201
2026-08-17 14:01:12 -07:00

32 lines
928 B
Docker

FROM ubuntu:jammy
RUN apt-get update && apt-get install -y \
curl \
dumb-init \
g++ \
make \
patch \
python3.10
WORKDIR /root
ARG VERSION=v22.2.0
RUN curl -o node-${VERSION}.tar.gz https://nodejs.org/dist/${VERSION}/node-${VERSION}.tar.gz \
&& tar -zxf node-${VERSION}.tar.gz \
&& rm -f node-${VERSION}.tar.gz
# Patch in a timeout increase to reduce test flakiness on gVisor
WORKDIR /root/node-${VERSION}
COPY timeouts.patch /tmp/timeouts.patch
RUN patch -p1 --no-backup-if-mismatch < /tmp/timeouts.patch \
&& rm -f /tmp/timeouts.patch
RUN ./configure
RUN make -j $(nproc) test-build
# Use node --check on the files we patched
RUN out/Release/node --check test/common/index.js \
&& out/Release/node --check test/parallel/test-http-outgoing-end-cork.js
# Including dumb-init emulates the Linux "init" process, preventing the failure
# of tests involving worker processes.
ENTRYPOINT ["/usr/bin/dumb-init"]