apupier opened a new pull request, #31248:
URL: https://github.com/apache/camel/pull/31248

   # Description
   
   CAMEL-25882 follow-up of #29704: share a single Cassandra container between 
all the integration test classes of `camel-cassandraql` instead of starting one 
per class (14 starts of 4-8s each).
   
   - `CassandraServiceFactory`: new `createSingletonService(String 
initScript)`, the init script is applied once when the container starts
   - `BaseCassandra`: use the shared service
   - `BasicDataSet.cql`: truncate every table used by the tests before each 
test, so the classes do not see the data of each other
   
   ## Benchmark
   
   `mvn verify -Pit -pl components/camel-cassandraql`, 94 tests passing before 
and after. The RSS of the forked failsafe JVM and the memory of the containers 
(`podman stats`) were sampled once per second, one run of each variant.
   
   | | before | after |
   |---|---|---|
   | wall time of the build | 123 s | 63 s |
   | Cassandra container starts | 14 | 1 |
   | time a Cassandra container is up | 90 s | 42 s |
   | container memory, peak | 1535 MB | 1590 MB |
   | container memory, average | 1385 MB | 1522 MB |
   | test JVM RSS, peak / average | 409 / 353 MB | 360 / 311 MB |
   | test JVM + containers, peak | 1944 MB | 1942 MB |
   
   The peak memory is unchanged: before, two containers overlapped while the 
previous one was stopping. The memory is simply held for half as long. The 
average container memory is slightly higher because the one container stays up 
and keeps growing for the whole run. With a single run per variant, differences 
of a few percent are noise.
   
   No upgrade guide entry: test-only change.
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL-25882) 
filed for the change
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I have run `mvn clean install -DskipTests` locally from root folder 
and I have committed all auto-generated changes.
   
   ---
   _IBM Bob on behalf of Aurélien Pupier_
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to