Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests encounter errors when retrieving metrics, but overall tests still pass. #32

Open
alexskr opened this issue Jul 16, 2024 · 1 comment

Comments

@alexskr
Copy link
Member

alexskr commented Jul 16, 2024

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

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

@alexskr
Copy link
Member Author

alexskr commented Nov 15, 2024

irrelevant,
will be removed due to #38

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant