summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorValery Piashchynski <[email protected]>2021-08-15 18:32:47 +0300
committerValery Piashchynski <[email protected]>2021-08-15 18:32:47 +0300
commit7469016ec237f4bedc23c2bae6a7fad52fc5faeb (patch)
treecf92bf06fd88a565bcd007211c939de0d261b4cd /tests
parent7b81e9e8cbe85a006bb0878d5bf4e22d0350041e (diff)
Update dockerfiles (use ubuntu instead of arch), replace heavy
memleak.php for the non-memory tests Signed-off-by: Valery Piashchynski <[email protected]>
Diffstat (limited to 'tests')
-rw-r--r--tests/env/Dockerfile-beanstalkd.yaml8
-rw-r--r--tests/supervised.php14
2 files changed, 17 insertions, 5 deletions
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(""));
+}