Investigate why unit tests for verifying credentials fail without time.Sleep
Unit tests started failing in October 2023 due to W3C web site (w3.org) introducing a Rate Limiter and Cloudflare defense frontend for the base VC 1.0/1.0 context URL: https://www.w3.org/2018/credentials/v1
To mitigate the problem we introduced a caching JSONLD document loader for the service and unit tests, but still some 3rd party dependency libraries seem to fetch the resource without using the caching loader.
We introduced a time.Sleep after each test case, so that the URL is not bombarded with many requests. We also wrote an email to the W3C team and they agreed to increase the rate limiting quota. Now the unit tests are passing fine.
This ticket is about investigation of our code and the 3rd party libraries and why, even though we're using a caching document loader, the tests still fail sometimes without the introduction of time.Sleep after each case.
This is very low priority as it's not blocking anything right now (tests are passing), but if anyone has time/impulse to investigate further, it may be an interesting task.