From e7b8aca605c09762b4bce448c94506db4c633000 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 11 Mar 2020 09:15:45 +0200 Subject: [PATCH 1/3] Stop MaxScale after tests This allows crashes on exit to be detected. --- maxscale-system-test/maxtest/src/testconnections.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/maxscale-system-test/maxtest/src/testconnections.cpp b/maxscale-system-test/maxtest/src/testconnections.cpp index 1492896f2..c39d4cae1 100644 --- a/maxscale-system-test/maxtest/src/testconnections.cpp +++ b/maxscale-system-test/maxtest/src/testconnections.cpp @@ -515,13 +515,14 @@ TestConnections::~TestConnections() // galera->disable_ssl(); } + // stop all Maxscales to detect crashes on exit + for (int i = 0; i < maxscales->N; i++) + { + stop_maxscale(i); + } + if (maxscales->use_valgrind) { - // stop all Maxscales to get proper Valgrind logs - for (int i = 0; i < maxscales->N; i++) - { - stop_maxscale(i); - } sleep(15); // sleep to let logs be written do disks } From 5121aa296e1ed6b02de89ec2c0a3a4937797b80e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Mon, 16 Mar 2020 15:09:41 +0200 Subject: [PATCH 2/3] Add timeout to rwsplit_readonly_stress This prevents the test from hanging. --- maxscale-system-test/rwsplit_readonly_stress.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/maxscale-system-test/rwsplit_readonly_stress.cpp b/maxscale-system-test/rwsplit_readonly_stress.cpp index e3771cc0b..e1c721888 100644 --- a/maxscale-system-test/rwsplit_readonly_stress.cpp +++ b/maxscale-system-test/rwsplit_readonly_stress.cpp @@ -102,6 +102,7 @@ int main(int argc, char* argv[]) } Test->tprintf("Waiting for all threads to finish\n"); + Test->set_timeout(60); running = 0; for (int i = 0; i < THREADS; i++) From a8e2584bfce172a6bc8f52764dc646777f0e68bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Markus=20M=C3=A4kel=C3=A4?= Date: Wed, 18 Mar 2020 10:41:39 +0200 Subject: [PATCH 3/3] Fix REST API servers documentation Always use plural form of the objects. PATCH example used PUT. --- Documentation/REST-API/API.md | 4 ++-- Documentation/REST-API/Resources-Server.md | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/REST-API/API.md b/Documentation/REST-API/API.md index fc4ac0dd1..0b22bfab6 100644 --- a/Documentation/REST-API/API.md +++ b/Documentation/REST-API/API.md @@ -213,7 +213,7 @@ must be one of the methods that the requested resource supports. #### Allow All resources return the Allow header with the supported HTTP methods. For -example the resource `/service` will always return the `Accept: GET, PATCH, PUT` +example the resource `/services` will always return the `Accept: GET, PATCH, PUT` header. #### Accept-Patch @@ -317,7 +317,7 @@ representation of the error. ```javascript { "error": { - "detail" : "The new `/server/` resource is missing the `port` parameter" + "detail" : "The new `/servers/` resource is missing the `port` parameter" } } ``` diff --git a/Documentation/REST-API/Resources-Server.md b/Documentation/REST-API/Resources-Server.md index 4ef3321ee..17adf8554 100644 --- a/Documentation/REST-API/Resources-Server.md +++ b/Documentation/REST-API/Resources-Server.md @@ -367,7 +367,7 @@ _server1_ from the service _RW-Split-Router_. Removing a service from a server is analogous to removing the server from the service. Both unlink the two objects from each other. -Response to `GET /v1/server/server1`: +Response to `GET /v1/servers/server1`: ```javascript { @@ -433,7 +433,7 @@ Response to `GET /v1/server/server1`: } ``` -Request for `PUT /v1/server/server1`: +Request for `PATCH /v1/servers/server1`: ```javascript {