Onto-Med / top-backend

Spring Boot based backend of the TOP Framework
MIT License
0 stars 1 forks source link

Fix failing code system test #179

Closed ChristophB closed 10 months ago

ChristophB commented 10 months ago

Test was working two weeks ago but is failing now - without any code changes.

ChristophB commented 10 months ago

I was able to reproduce the failed test in my development env. But it does not fail consistently.

ChristophB commented 10 months ago

Ok, found the culprit.

The issue is that code systems (i.e. OLS ontologies) are cached by CodeSystemRepository to improve response times. The OLS mockup server only gets created in CodeServiceTest. Calls to CodeSystemRepository::getAllCodeSystems that are performed before the CodeServiceTest init the cache with an empty array.