gruuya opened a new pull request, #924:
URL: https://github.com/apache/iceberg-rust/pull/924

   Closes #923
   
   This PR makes integration tests re-use the same set of docker containers, 
hence allowing them to be run concurrently
   
   1. all existing tests are moved to a `shared` module, with a single 
top-level `main.rs` file, thus requiring only [one 
compilation](https://corrode.dev/blog/tips-for-faster-rust-compile-times/#combine-all-integration-tests-into-a-single-binary)
 step (as opposed to compiling every test file individually
   2. `set_test_fixture` is made sync, since there's no async code in it
   3. given 1 and 2, the test fixture is wrapped in a `OnceLock`, so that it is 
invoked only once for the resulting (shared) test binary; it also has a 
corresponding destructor to spin down the containers after the tests run
   4. if there's a need for integration tests which don't use the shared docker 
containers, their test files should be placed alongside `main.rs` (top-level); 
otherwise they should be created in the `shared` module
   5. one (shared) file can now contain an arbitrary number of tests that 
utilize the shared set of containers (without having to resort to decorating 
them with `#[serial]`)
   
   Finally, with this change my integration test runs go from taking ~3.5 
minutes down to 30 seconds.
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to