oscerd commented on issue #2872:
URL:
https://github.com/apache/camel-kamelets/issues/2872#issuecomment-5812380737
Took step 1. **`DeleteItem` does not take effect, and `UpdateItem` does.**
I set the post-delete expectation in
`aws-ddb-sink-delete-item.citrus.it.yaml` to `[]` — the table should be empty
once the item is deleted — and ran `AwsIT`:
```
✔ SUCCESS (29346ms) aws-ddb-sink-put-item-test
✔ SUCCESS (44427ms) aws-ddb-sink-update-item-test
✘ FAILED (60438ms) aws-ddb-sink-delete-item-test
✔ SUCCESS (77008ms) aws-ddb-source-test
... every other AWS test green
```
The delete verification retried to exhaustion with `AWS DDB item
verification failed` — the item is still in the table after the sink has run.
That narrows this issue in two ways.
**`UpdateItem` is no longer a problem.** This issue records both
`UpdateItem` and `DeleteItem` failing against LocalStack. On Floci,
`UpdateItem` passes. Only the delete is left.
**The current test asserts the broken state.** After running the sink with
`DeleteItem`, it reuses the expectation from *before* the delete:
```yaml
# Verify Kamelet sink
- createVariables:
variables:
- name: "aws.ddb.items"
value: "[[id:AttributeValue(N=${aws.ddb.item.id}), ...]]"
```
So it asserts the item is still present. It passes because the delete does
nothing, and it will start failing the day the delete begins working. That is
worth fixing regardless of the underlying cause, and it is why I have not
pushed the one-line assertion change on its own — correcting it turns a green
test red without fixing the behaviour.
## What is still unanswered
Whether Floci does not implement `DeleteItem`, or something in the producer
path drops it. That needs the direct `aws2-ddb` to Floci test with no Kamelet
in between, which I still have not run. Given `UpdateItem` works through the
same Kamelet and the same emulator, the emulator looks the more likely of the
two, but that is inference rather than evidence.
## Suggested next step
Rather than leaving an assertion that documents a bug as correct, replace it
with an explicit, commented acknowledgement that the delete is not verified
pending this issue — so the test neither passes for the wrong reason nor breaks
when the behaviour is fixed. Happy to do that, or to run the direct producer
test first if you would rather pin the cause before touching the test.
---
_Claude Code on behalf of Andrea Cosentino_
--
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]