Skip to content

Commit 826131f

Browse files
eesa456axelkrastek1-nhs
authored andcommitted
NRL-497 remove count from smoke and perf tests
1 parent 049b48c commit 826131f

File tree

6 files changed

+0
-65
lines changed

6 files changed

+0
-65
lines changed

tests/performance/consumer/baseline.js

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,6 @@ export const options = {
88
},
99
],
1010
scenarios: {
11-
countDocumentReference: {
12-
exec: "countDocumentReference",
13-
executor: "ramping-arrival-rate",
14-
startRate: 1,
15-
timeUnit: "1s",
16-
preAllocatedVUs: 5,
17-
stages: [
18-
{ target: 5, duration: "30s" },
19-
{ target: 5, duration: "1m" },
20-
],
21-
},
2211
readDocumentReference: {
2312
exec: "readDocumentReference",
2413
executor: "ramping-arrival-rate",

tests/performance/consumer/client.js

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -34,22 +34,6 @@ function checkResponse(res) {
3434
}
3535
}
3636

37-
export function countDocumentReference() {
38-
const choice = Math.floor(Math.random() * NHS_NUMBERS.length);
39-
const nhsNumber = NHS_NUMBERS[choice];
40-
41-
const identifier = encodeURIComponent(
42-
`https://fhir.nhs.uk/Id/nhs-number|${nhsNumber}`
43-
);
44-
const res = http.get(
45-
`https://${__ENV.HOST}/consumer/DocumentReference/_count?subject:identifier=${identifier}`,
46-
{
47-
headers: getHeaders(),
48-
}
49-
);
50-
checkResponse(res);
51-
}
52-
5337
export function readDocumentReference() {
5438
const choice = Math.floor(Math.random() * POINTER_IDS.length);
5539
const id = POINTER_IDS[choice];

tests/performance/consumer/soak.js

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,6 @@ export const options = {
88
},
99
],
1010
scenarios: {
11-
countDocumentReference: {
12-
exec: "countDocumentReference",
13-
executor: "ramping-arrival-rate",
14-
startRate: 0,
15-
timeUnit: "1s",
16-
preAllocatedVUs: 5,
17-
stages: [
18-
{ target: 10, duration: "5m" },
19-
{ target: 10, duration: "30m" },
20-
{ target: 0, duration: "1m" },
21-
],
22-
},
2311
readDocumentReference: {
2412
exec: "readDocumentReference",
2513
executor: "ramping-arrival-rate",

tests/performance/consumer/stress.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,6 @@ export const options = {
88
},
99
],
1010
scenarios: {
11-
countDocumentReference: {
12-
exec: "countDocumentReference",
13-
executor: "ramping-vus",
14-
startVUs: 1,
15-
stages: [
16-
{ target: 10, duration: "30s" },
17-
{ target: 10, duration: "1m" },
18-
],
19-
},
2011
readDocumentReference: {
2112
exec: "readDocumentReference",
2213
executor: "ramping-vus",

tests/smoke/scenarios/consumer_count_search_read.py

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
import pytest
44

5-
from nrlf.core.constants import NHS_NUMBER_SYSTEM_URL
65
from tests.smoke.environment import SmokeTestParameters
76
from tests.smoke.setup import build_document_reference, upsert_test_pointer
87
from tests.utilities.api_clients import ConsumerTestClient, ProducerTestClient
@@ -46,13 +45,6 @@ def test_consumer_count_search_read(
4645
patient_id = test_data["patient_nhs_number"]
4746
test_pointers = test_data["pointers"]
4847

49-
# Count
50-
count_response = consumer_client.count(
51-
{"subject:identifier": f"{NHS_NUMBER_SYSTEM_URL}|{patient_id}"}
52-
)
53-
assert count_response.ok
54-
assert count_response.json()["total"] >= len(test_pointers)
55-
5648
# Search
5749
search_response = consumer_client.search(patient_id)
5850
assert search_response.ok

tests/utilities/api_clients.py

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -100,15 +100,6 @@ def read(self, doc_ref_id: str) -> Response:
100100
cert=self.config.client_cert,
101101
)
102102

103-
@retry_if([502])
104-
def count(self, params: dict[str, str]) -> Response:
105-
return requests.get(
106-
f"{self.api_url}/DocumentReference/_count",
107-
params=params,
108-
headers=self.request_headers,
109-
cert=self.config.client_cert,
110-
)
111-
112103
@retry_if([502])
113104
def search(
114105
self,

0 commit comments

Comments
 (0)