phenoscape / rphenoscape

R package to make phenotypic traits from the Phenoscape Knowledgebase available from within R.
https://rphenoscape.phenoscape.org/
Other
5 stars 5 forks source link

Fix automated tests #276

Closed johnbradley closed 1 year ago

johnbradley commented 1 year ago

The scheduled automated tests failed today in one test:

Error: custom user agent is set (@test-kb.R#5)

Initially this test failed in r3. Rerunning this test failed in r4

johnbradley commented 1 year ago

Here is the code that failed: https://github.com/phenoscape/rphenoscape/blob/de2736b497b45dae8c365add8bd08a520b45c7c2/tests/testthat/test-kb.R#L3-L5 Rerunning a third time both tests passed. Since this uses an external server perhaps that server was just temporary overloaded.

hlapp commented 1 year ago

I agree, it's one of those free services that probably just gets overloaded at difficult to predict times. Ideally we could move this to a local test, using some kind of mock http service if one exists.

We certainly can't have a test like this run at CRAN anyway without protecting from failure. (Packages which use Internet resources should fail gracefully with an informative message if the resource is not available or has changed (and not give a check warning nor error). from the CRAN Repository Policy)