dorset-ics / healthcare-data-exchange

A FHIR based integration and interoperability platform to support a regional healthcare network.
https://dorset-ics.github.io/healthcare-data-exchange/
MIT License
6 stars 6 forks source link

fix: performance of terminology server tests #6

Closed liammoat closed 3 months ago

liammoat commented 3 months ago

In the Dorset downstream project, the Unit Tests fail to execute in a timely fashion. This is due to the IMemoryCache mock - and it's poor performance when the Snomed codes are populated.

This PR replaces the unnecessary mock, and uses a newly instantiated MemoryCache for each test execution.

With a full Snomed dataset, the Unit Tests now complete in a more reasonable time window. As seen here:

image

Note: I have also updated the test to use a Snomed code from an example provided in this NHS article.

gaurarpit commented 3 months ago

this is a very good catch and fix. thanks.