Closed unkcpz closed 8 months ago
Hmm, I would think that the timeout needs to be placed after the widget is initialized inside the test?
I want to timeout the test itself to not block the other tests, although it will failed in timeout which is expected for this case, after the cod is back, the test will pass.
I don't understand. Why is it expected that the test should timeout? We ideally want to fix the test itself no? Surely when the test times out it should fail the test suite, even if all other tests pass.
Why is it expected that the test should timeout?
I don't think we can "fix" it, the problem is for the cod server side. Once the server is working, the test will pass. So if we find only this test failed and the cod server is not accessible, we can still continue with merging the PRs.
the problem is for the cod server side. Once the server is working,
Okay, could you please open an issue and explain in detail what the problem is? In the meantime, I would suggest to simply skip the test (@pytest.mark.skip
I think). That's a much easier and more robust solution than the timeout.
The test is passing now, btw.
@yakutovicha thanks! I think it is not a bad idea to add the timeout, then we don't stuck the test in the future if the cod server not accessible again in the future (although quite rare I hope). If skip it, then it requires to change the test by PRs. If you think it not worth to do like this I'll close the PR.
I think it is not a bad idea to add the timeout, then we don't stuck the test in the future if the cod server not accessible again in the future (although quite rare I hope).
So as far as I can see, adding the timeout doesn't solve the test problem itself, but just speeds up the test failure in case of trouble. Which is not a bad thing, in the end.
To resolve the issue we might monkey-patch the output of the request sent to the COD, but that is for another PR. Not sure if this is a good idea, though. Because if COD changes something, then the problem might go unnoticed.
Another (somewhat radical) idea is to deprecate the widget and only rely on the OPTIMADE one, which also includes COD.
@danielhollas, do you agree with this change?
Sure, let's try it, but the tests are currently failing??
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
9277a67
) 85.82% compared to head (3600ab3
) 85.83%.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
I didn't retrigger the test after COD was alive. All passed now :)
Temporary solution to timeout the cod query widget test.