forked from ontoportal/ncbo_annotator
-
Notifications
You must be signed in to change notification settings - Fork 9
Open
Description
Unit tests encounter errors when retrieving metrics, but they still pass, which raises questions about the validity of those tests.
TestRecommender#test_recommend = E, [2024-07-04T00:18:44.738241 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/BROTEST-0 in Recommender.
E, [2024-07-04T00:18:44.776653 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/ONTOMATEST-0 in Recommender.
E, [2024-07-04T00:18:44.815828 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/MCCLTEST-0 in Recommender.
0.15 s = .
TestRecommender#test_recommend_with_classes = E, [2024-07-04T00:18:44.884464 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/BROTEST-0 in Recommender.
E, [2024-07-04T00:18:44.923456 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/ONTOMATEST-0 in Recommender.
E, [2024-07-04T00:18:44.961876 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/MCCLTEST-0 in Recommender.
0.15 s = .
TestRecommender#test_recommend_with_ontologies = E, [2024-07-04T00:18:45.029686 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/BROTEST-0 in Recommender.
E, [2024-07-04T00:18:45.068835 #8] ERROR -- : Unable to retrieve metrics for latest submission of http://data.bioontology.org/ontologies/MCCLTEST-0 in Recommender.
0.11 s = .
Finished tests in 24.179108s, 0.6204 tests/s, 535.8758 assertions/s.
15 tests, 12957 assertions, 0 failures, 0 errors, 1 skips
I think its because we are rescuing error here
ncbo_annotator/lib/ncbo_recommender.rb
Lines 74 to 82 in 63c9868
| begin | |
| sub.bring(metrics: LinkedData::Models::Metric.attributes) | |
| cls_count = sub.metrics.classes | |
| rescue | |
| @logger.error("Unable to retrieve metrics for latest submission of #{ont.id.to_s} in Recommender.") | |
| cls_count = LinkedData::Models::Class.where.in(sub).count | |
| end | |
| return cls_count || 0 | |
| end |
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels