Anthippi commented on PR #10557:
URL: https://github.com/apache/seatunnel/pull/10557#issuecomment-4031102446

   @DanielCarter-stack @yzeng1618  Thank you again for the incredibly detailed 
and constructive review! I have addressed and resolved all the issues you 
raised in the latest commits.
   
   Just to give a quick summary of the latest updates to prove the stability 
and robustness of these fixes:
   
   1. `Unit Tests Refactoring:` I refactored the unit tests to respect the 
Single Responsibility Principle, separating them into `RabbitmqSourceTest.java` 
and `RabbitmqSourceReaderTest.java`.
   
   2. `Edge-Case Proof:` These tests explicitly use Mockito to prove that all 
the edge-cases discussed are handled safely:
       - Issues 1 & 3: Thread-safety of `sourceSplits` and graceful consumer 
resource cleanup (no duplicate creations or resource leaks).
       - Issues 2 & 5: Strict fail-fast validation for mutually exclusive 
configs and immediate exceptions for unconfigured queues (no more silent 
message dropping).
   
   3. `E2E Validation (Issue 6):` I initially tried your suggestion to use 
separate `Assert` sinks per table. However, while digging into the SeaTunnel 
source code, I found that `AssertSinkWriter` relies on a `static 
LONG_ACCUMULATOR`. Using multiple Assert sinks in the same job causes 
unavoidable race conditions on this shared static counter, making the test 
flaky. To achieve the exact per-table validation you requested without hitting 
this framework limitation, I configured a single `Assert sink` utilizing the 
`tables_configs` array natively inside the `rules` block. It works perfectly 
and strictly validates schemas and limits per-table!


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