You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2026/10/18 07:59:09 UTC

(camel-performance-tests) branch main updated: ai-benchmark: the sql upsert check accepts doTry/doCatch

This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-performance-tests.git


The following commit(s) were added to refs/heads/main by this push:
     new 981c7a2  ai-benchmark: the sql upsert check accepts doTry/doCatch
981c7a2 is described below

commit 981c7a25abc74951bcd1baba780bf6fc81d6fb17
Author: Claus Ibsen <cl...@gmail.com>
AuthorDate: Sun Oct 18 09:57:00 2026 +0200

    ai-benchmark: the sql upsert check accepts doTry/doCatch
    
    connect-service-sql step 1 asks that a customer registered again does not
    fail on a duplicate key. ON CONFLICT or MERGE is the best practice, but an
    INSERT in doTry with an UPDATE in doCatch is how users who think in Java
    try/catch write it, and it works (r17-9). The log checks stay as they were.
    Of all series, only r17-9 changes: two older doCatch runs failed the log
    check as well.
    
    Co-Authored-By: Claude Opus 5.5 (1M context) <no...@anthropic.com>
    Claude-Session: https://claude.ai/code/session_01STT6whBgK1AqsSsUKrnE8m
---
 ai-benchmark/gen_stepwise.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ai-benchmark/gen_stepwise.py b/ai-benchmark/gen_stepwise.py
index 78f161a..34bc0f9 100644
--- a/ai-benchmark/gen_stepwise.py
+++ b/ai-benchmark/gen_stepwise.py
@@ -370,7 +370,7 @@ EXAMPLES.append({
     "initial": {SQL: sql_s1, "application.properties": SQL_PROPS},
     "steps": [
         {"request": "Add a route register-customers that reads the JSON files in the orders directory (file endpoint with noop true, sortBy file:name and initialDelay 2000), unmarshals each with Jackson, and registers the customer in the customers table with the sql component using named parameters from the body: a new customer gets a row (id from body[customer], country from body[country], orders 1), a customer that already has a row gets orders + 1; the orders directory is read again e [...]
-         "check": {"file_regex": "CONFLICT|MERGE", "log_regex": ["Customer C-482 from DK registered with order ORD-1001", "Customer C-134 from US registered with order ORD-1003"], "log_not_regex": "Syntax error|duplicate key value"},
+         "check": {"file_regex": "CONFLICT|MERGE|doCatch", "log_regex": ["Customer C-482 from DK registered with order ORD-1001", "Customer C-134 from US registered with order ORD-1003"], "log_not_regex": "Syntax error|duplicate key value"},
          "reference": {SQL: sql_s3}},
         {"request": "Add a route customer-report from a timer (delay 5000, period 10000) that selects id, country and orders from customers ordered by id, logs \"${body.size()} customer(s) in the table\", and splits the list to log \"  ${body[id]} (${body[country]}): ${body[orders]} order(s)\" per row.",
          "check": {"file_regex": "split", "log_regex": ["3 customer\\(s\\) in the table", "C-482 \\(DK\\): \\d+ order\\(s\\)"]},