davsclaus opened a new pull request, #3269:
URL: https://github.com/apache/camel-kamelets/pull/3269

   Part of #3261: Citrus tests for the eight Database Kamelets that had none. 
Snowflake and Databricks need cloud accounts and are left out. As in #3262, 
each route records the body type (`X-Body-Type`) and the `Content-Type` 
(`X-Content-Type`) the Kamelet gives, for #3117.
   
   | Database (image) | Kamelets | Ready when the log shows |
   |---|---|---|
   | MariaDB (`mariadb:11.4`) | `mariadb-source`, `mariadb-sink` | `port: 3306` 
|
   | MySQL (`mysql:8.4`) | `mysql-source`, `mysql-sink` | `ready for 
connections ... port: 3306` |
   | SQL Server (`mcr.microsoft.com/mssql/server:2022-latest`) | 
`sqlserver-source`, `sqlserver-sink` (with `trustServerCertificate: true`, as 
documented) | `SQL Server is now ready for client connections` |
   | Oracle Free (`gvenzl/oracle-free:23-slim`, `FREEPDB1`) | 
`oracle-database-source`, `oracle-database-sink` | `DATABASE IS READY TO USE` |
   
   ### How the tests check
   - **Sources:** a row in `accounts` comes out as a JSON object: 
`{"id":1,"username":"oscerd","city":"Rome"}`, and `{"ID":1,...}` from Oracle, 
which gives the column names in upper case, as its description says. The test 
then checks that `consumedQuery` (`DELETE ... WHERE id = :#id`) removed the row.
   - **Sinks:** `{"id": 99, "username": "sink-test", "city": "Oslo"}` goes in 
with `INSERT ... VALUES (:#id, :#username, :#city)`. The test checks 
`CamelSqlUpdateCount` = 1 and the row in the table.
   - **No JDBC drivers in the itest pom:** a shared `database/sql.groovy` runs 
SQL with the database's own command line client inside the container 
(`mariadb`, `mysql`, `sqlcmd`, `sqlplus`). It sets up SQL Server and Oracle and 
checks the rows of all four. The MariaDB, MySQL and Oracle drivers are LGPL, 
GPL or Oracle-licensed, so they stay out of the build. Camel JBang adds the 
driver to the Kamelet itself, as the descriptions say.
   - **No fixed waits:** checks that depend on timing run inside 
`repeatOnError`, without `Thread.sleep`.
   
   ### What the Kamelets give today
   | Kamelet | Body | `Content-Type` |
   |---|---|---|
   | The four sources | `InputStreamCache` (JSON text in a stream) | 
`application/json` |
   | The four sinks (afterwards) | `LinkedHashMap` (the JSON object as a Map) | 
none |
   
   No Kamelet failed or behaved against its description.
   
   All five images are served by `mirror.gcr.io`, which CI uses, checked with 
the registry API. The SQL Server image is amd64 only, and ran under emulation 
on an arm64 Mac.
   
   ### Tests
   `DatabaseIT` (new): 8 of 8 pass, in two runs in a row, in about 90 s. 
`./mvnw clean install` from the root passes.
   
   _Claude Code on behalf of Claus Ibsen_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


-- 
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