diff options
author | Valery Piashchynski <[email protected]> | 2021-08-15 18:32:47 +0300 |
---|---|---|
committer | Valery Piashchynski <[email protected]> | 2021-08-15 18:32:47 +0300 |
commit | 7469016ec237f4bedc23c2bae6a7fad52fc5faeb (patch) | |
tree | cf92bf06fd88a565bcd007211c939de0d261b4cd | |
parent | 7b81e9e8cbe85a006bb0878d5bf4e22d0350041e (diff) |
Update dockerfiles (use ubuntu instead of arch), replace heavy
memleak.php for the non-memory tests
Signed-off-by: Valery Piashchynski <[email protected]>
-rw-r--r-- | pkg/pool/supervisor_test.go | 2 | ||||
-rw-r--r-- | tests/env/Dockerfile-beanstalkd.yaml | 8 | ||||
-rw-r--r-- | tests/supervised.php | 14 |
3 files changed, 18 insertions, 6 deletions
diff --git a/pkg/pool/supervisor_test.go b/pkg/pool/supervisor_test.go index 21cf1db5..28338ef5 100644 --- a/pkg/pool/supervisor_test.go +++ b/pkg/pool/supervisor_test.go @@ -65,7 +65,7 @@ func TestSupervisedPool_ExecWithDebugMode(t *testing.T) { ctx := context.Background() p, err := Initialize( ctx, - func() *exec.Cmd { return exec.Command("php", "../../tests/memleak.php", "pipes") }, + func() *exec.Cmd { return exec.Command("php", "../../tests/supervised.php") }, pipe.NewPipeFactory(), cfgSupervised, ) diff --git a/tests/env/Dockerfile-beanstalkd.yaml b/tests/env/Dockerfile-beanstalkd.yaml index 852385a1..7b36f8d3 100644 --- a/tests/env/Dockerfile-beanstalkd.yaml +++ b/tests/env/Dockerfile-beanstalkd.yaml @@ -1,15 +1,13 @@ -FROM archlinux:latest +FROM ubuntu:latest ARG DEBIAN_FRONTEND=noninteractive -RUN pacman-key --init -RUN Y | pacman -Syu --noconfirm -RUN Y | pacman -S --noconfirm curl base-devel pkgconf +RUN apt-get update && apt-get install -y curl build-essential pkg-config RUN curl -sL https://github.com/kr/beanstalkd/archive/v1.12.tar.gz | tar xvz -C /tmp WORKDIR /tmp/beanstalkd-1.12 -RUN make -j12 +RUN make RUN cp beanstalkd /usr/bin EXPOSE 11300 diff --git a/tests/supervised.php b/tests/supervised.php new file mode 100644 index 00000000..74f8c994 --- /dev/null +++ b/tests/supervised.php @@ -0,0 +1,14 @@ +<?php + +declare(strict_types=1); + +use Spiral\Goridge\StreamRelay; +use Spiral\RoadRunner\Worker as RoadRunner; + +require __DIR__ . "/vendor/autoload.php"; + +$rr = new RoadRunner(new StreamRelay(\STDIN, \STDOUT)); +$mem = ''; +while($rr->waitPayload()){ + $rr->respond(new \Spiral\RoadRunner\Payload("")); +} |