From d2adad93ac0698cece77d8eb16315af2af7080b9 Mon Sep 17 00:00:00 2001 From: wess Date: Thu, 17 Nov 2022 12:35:56 -0500 Subject: [PATCH] increase ci sleep time --- .github/workflows/tests.yml | 2 +- tests/benchmarks/http.js | 26 +++++++++++++++----------- 2 files changed, 16 insertions(+), 12 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 8e185944b6..b7425ae240 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -32,7 +32,7 @@ jobs: docker pull composer:2.0 docker compose build appwrite docker compose up -d - sleep 30 + sleep 60 - name: Doctor run: docker compose exec -T appwrite doctor diff --git a/tests/benchmarks/http.js b/tests/benchmarks/http.js index 799c8fb23c..de48c0b3a7 100644 --- a/tests/benchmarks/http.js +++ b/tests/benchmarks/http.js @@ -10,25 +10,29 @@ export const requests = new Counter('http_reqs'); export const options = { stages: [ - { target: 50, duration: '1m' }, - // { target: 15, duration: '1m' }, - // { target: 0, duration: '1m' }, - ], - thresholds: { - requests: ['count < 100'], - }, + { target: 150, duration: '1m' }, + { target: 150, duration: '1m' }, + { target: 0, duration: '1m' }, + ] + // thresholds: { + // requests: ['count < 100'], + // }, }; +// testing (63766a35b47c0dae6b5a) is any/all + export default function () { const config = { headers: { - 'X-Appwrite-Key': '24356eb021863f81eb7dd77c7750304d0464e141cad6e9a8befa1f7d2b066fde190df3dab1e8d2639dbb82ee848da30501424923f4cd80d887ee40ad77ded62763ee489448523f6e39667f290f9a54b2ab8fad131a0bc985e6c0f760015f7f3411e40626c75646bb19d2bb2f7bf2f63130918220a206758cbc48845fd725a695', - 'X-Appwrite-Project': '60479fe35d95d' - }} + // 'X-Appwrite-Key': '62115c397d1f1644730ff5df69f7fec6daa898c11e41f314fd6e210cac536a2fbcefa96ca9e5c7b4e2fcb7a535f1e8fc16c27829c1ccab3d6a1726e31d561cdaf8dc64c63e0e9ad0f406a8f9703edfbbf0f9ac6a9271d573b2ea08805220dbede08db1c8e6cf792582ef8452b82bcd96e9890fb79109d05b6fda1b1673d35292', + 'X-Appwrite-Project': '637666b7f1733a4b00a8' + } + } - const resDb = http.get('http://localhost:9501/', config); + const resDb = http.get('http://localhost:9501/v1/databases/benchmarking/collections/63766a35b47c0dae6b5a/documents', config); check(resDb, { 'status is 200': (r) => r.status === 200, + 'total': (r) => JSON.parse(r.body).documents.length === 15 }); } \ No newline at end of file