You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -197,7 +197,7 @@ To access the client service, visit the http://localhost:9084/openapi/ui/[^] URL
197
197
198
198
=== Try the query operations
199
199
200
-
From the OpenAPI UI, test the read operation at the `GET /query/system/{hostname}` endpoint. This request retrieves the system properties for the `hostname` specified. The following example shows what happens when the `hostname` is set to `system-java8`, but you can try out the operations using the hostname `system-java11` as well:
200
+
From the OpenAPI UI, test the read operation at the `GET /query/system/{hostname}` endpoint. This request retrieves the system properties for the `hostname` specified. The following example shows what happens when the `hostname` is set to `system-java11`, but you can try out the operations using the hostname `system-java17` as well:
201
201
202
202
endif::[]
203
203
@@ -209,10 +209,10 @@ To access the client service, there are several available REST endpoints that te
209
209
210
210
First, make a GET request to the ***/query/system/{hostname}*** endpoint by the following command. This request retrieves the system properties for the specified ***hostname***.
211
211
212
-
The ***hostname*** is set to ***system-java8***. You can try out the operations using the hostname ***system-java11*** as well.
212
+
The ***hostname*** is set to ***system-java11***. You can try out the operations using the hostname ***system-java17*** as well.
You can expect a response similar to the following example:
218
218
@@ -221,36 +221,36 @@ endif::[]
221
221
[role='no_copy']
222
222
----
223
223
{
224
-
"hostname": "system-java8",
224
+
"hostname": "system-java11",
225
225
"java": {
226
-
"vendor": "International Business Machines Corporation",
227
-
"version": "1.8.0_312"
226
+
"vendor": "IBM Corporation",
227
+
"version": "11.0.18"
228
228
},
229
229
"osArch": "amd64",
230
230
"osName": "Linux",
231
-
"osVersion": "5.10.25-linuxkit",
231
+
"osVersion": "5.15.0-67-generic",
232
232
"systemMetrics": {
233
-
"heapSize": 2086993920,
233
+
"heapSize": 536870912,
234
234
"nonHeapSize": -1,
235
-
"processors": 8
235
+
"processors": 2
236
236
},
237
237
"username": "default"
238
238
}
239
239
----
240
240
241
241
ifndef::cloud-hosted[]
242
242
243
-
You can retrieve the information about the resource usage of any number of system services at the `GET /query/systemLoad/{hostnames}` endpoint. The following example shows what happens when the `hostnames` are set to `system-java8,system-java11`:
243
+
You can retrieve the information about the resource usage of any number of system services at the `GET /query/systemLoad/{hostnames}` endpoint. The following example shows what happens when the `hostnames` are set to `system-java11,system-java17`:
244
244
245
245
endif::[]
246
246
247
247
ifdef::cloud-hosted[]
248
248
249
249
You can retrieve the information about the resource usage of any number of system services by making a GET request at ***/query/systemLoad/{hostnames}*** endpoint.
250
-
The ***hostnames*** are set to ***system-java8,system-java11***.
250
+
The ***hostnames*** are set to ***system-java11,system-java17***.
You can expect the following response is similar to the following example:
@@ -261,19 +261,19 @@ endif::[]
261
261
----
262
262
[
263
263
{
264
-
"hostname": "system-java8",
264
+
"hostname": "system-java11",
265
265
"loadData": {
266
-
"heapUsed": 34251904,
267
-
"loadAverage": 0.11,
268
-
"nonHeapUsed": 84034688
266
+
"heapUsed": 30090920,
267
+
"loadAverage": 0.08,
268
+
"nonHeapUsed": 87825316
269
269
}
270
270
},
271
271
{
272
-
"hostname": "system-java11",
272
+
"hostname": "system-java17",
273
273
"loadData": {
274
-
"heapUsed": 41953280,
275
-
"loadAverage": 0.11,
276
-
"nonHeapUsed": 112506520
274
+
"heapUsed": 39842888,
275
+
"loadAverage": 0.08,
276
+
"nonHeapUsed": 93098960
277
277
}
278
278
}
279
279
]
@@ -282,12 +282,12 @@ endif::[]
282
282
ifndef::cloud-hosted[]
283
283
=== Try the mutation operation
284
284
285
-
You can also make requests to add a note to a system service at the `POST /query/mutation/system/note` endpoint. To add a note to the system service running on Java 8, specify the following in the request body:
285
+
You can also make requests to add a note to a system service at the `POST /query/mutation/system/note` endpoint. To add a note to the system service running on Java 11, specify the following in the request body:
286
286
287
287
[role='command']
288
288
----
289
289
{
290
-
"hostname": "system-java8",
290
+
"hostname": "system-java11",
291
291
"text": "I am trying out GraphQL on Open Liberty!"
292
292
}
293
293
----
@@ -302,17 +302,16 @@ You can also make POST requests to add a note to a system service at the ***/que
302
302
To add a note to the system service running on Java 8, run the following command:
303
303
304
304
```bash
305
-
curl -i -X 'POST' 'http://localhost:9084/query/mutation/system/note' -H 'Content-Type: application/json' -d '{"hostname": "system-java8","text": "I am trying out GraphQL on Open Liberty!"}'
305
+
curl -i -X 'POST' 'http://localhost:9084/query/mutation/system/note' -H 'Content-Type: application/json' -d '{"hostname": "system-java11","text": "I am trying out GraphQL on Open Liberty!"}'
306
306
```
307
307
308
308
You will recieve a `200` response code, similar to below, if the request is processed succesfully.
Define the [hotspot=systemContainer file=2]`systemContainer` test container to start up the `system-java8` image, the [hotspot=graphqlContainer file=2]`graphqlContainer` test container to start up the `graphql` image, and the [hotspot=libertyContainer file=2]`libertyContainer` test container to start up the `query` image. Make sure that the containers use the same network.
396
+
Define the [hotspot=systemContainer file=2]`systemContainer` test container to start up the `system-java11` image, the [hotspot=graphqlContainer file=2]`graphqlContainer` test container to start up the `graphql` image, and the [hotspot=libertyContainer file=2]`libertyContainer` test container to start up the `query` image. Make sure that the containers use the same network.
398
397
399
398
The [hotspot=testcontainers file=2]`@Testcontainers` annotation finds all fields that are annotated with the [hotspot=container file=2]`@Container` annotation and calls their container lifecycle methods. The `static` function declaration on each container indicates that this container will be started only once before any test method is executed and stopped after the last test method is executed.
400
399
401
-
The [hotspot=testGetSystem file=2]`testGetSystem()` verifies the `/query/system/{hostname}` endpoint with `hostname` set to `system-java8`.
400
+
The [hotspot=testGetSystem file=2]`testGetSystem()` verifies the `/query/system/{hostname}` endpoint with `hostname` set to `system-java11`.
402
401
403
-
The [hotspot=testGetSystemLoad file=2]`testGetSystemLoad()` verifies the `/query/systemLoad/{hostnames}` endpoint with `hostnames` set to `system-java8`.
402
+
The [hotspot=testGetSystemLoad file=2]`testGetSystemLoad()` verifies the `/query/systemLoad/{hostnames}` endpoint with `hostnames` set to `system-java11`.
404
403
405
404
The [hotspot=testEditNote file=2]`testEditNote()` verifies the mutation operation at the `/query/mutation/system/note` endpoint.
0 commit comments