enso/test
Radosław Waśko 354ee94a2f
Make HTTP tests more robust by adding retries to the tests (#9652)
- As asked for by @hubertp who was encountering flaky test failures on CI in the Http_Spec and related ones, I'm adding retry logic to make such cases much less likely.
- I've made the test server randomly fail 50% of tests and with the retry logic the tests are still passing, so I think that should be much more robust, in practice the failure rate is much much less (I imagine <1% as most of the time these tests were working and we do a ton of requests in a single CI run).
- I move the `with_retries` method to now be `Test.with_retries` which can be used anywhere in our tests for the retry logic.
- It sleeps for 0.1s between retries. Not all kinds of tests need it, this was mostly for propagation delays in the Cloud in our tests. I was thinking if the delay should be configurable, but I think the 0.1s delay is not problematic and if our tests are sometimes failing due to high machine load, the delay could also help.
- This _does not_ add retry logic to raw HTTP operations or `Data.fetch`. We may add that later, but that needs some further design. In such case we may remove some retries from tests if they become unnecessary.
2024-04-09 10:07:22 +00:00
..
AWS_Tests Make HTTP tests more robust by adding retries to the tests (#9652) 2024-04-09 10:07:22 +00:00
Base_Tests Make HTTP tests more robust by adding retries to the tests (#9652) 2024-04-09 10:07:22 +00:00
Benchmarks Do not disable BackgroundCompilation in benchmarks (#9646) 2024-04-08 16:49:57 +02:00
Examples_Tests Enso tests can be run with filter from cmdline (#9065) 2024-02-22 12:31:44 +00:00
Exploratory_Benchmarks Restructure Standard.Table. (#9559) 2024-03-27 17:10:43 +00:00
Geo_Tests Restructure Standard.Table. (#9559) 2024-03-27 17:10:43 +00:00
Google_Api_Test Enso tests can be run with filter from cmdline (#9065) 2024-02-22 12:31:44 +00:00
Image_Tests Move Standard.Database.Data to Standard.Database. (#9321) 2024-03-07 14:43:38 +00:00
micro-distribution Implement refreshing the Cloud token in Enso libraries (#9390) 2024-03-19 19:26:34 +00:00
Table_Tests Make HTTP tests more robust by adding retries to the tests (#9652) 2024-04-09 10:07:22 +00:00
Visualization_Tests Restructure Standard.Table. (#9559) 2024-03-27 17:10:43 +00:00