currenjin opened a new pull request, #13802:
URL: https://github.com/apache/skywalking/pull/13802

   ## What's this PR about?
   
   Add unit tests for `JDBCEventQueryDAO.buildQuery()` to verify SQL condition 
building logic.
   
   ## Which issue does this PR relate to?
   
   N/A — test coverage improvement.
   
   ## Tests
   
   New test class: `JDBCEventQueryDAOTest`
   
   | Test | Description |
   |------|-------------|
   | `buildQuery_shouldAlwaysContainTableColumnCondition` | TABLE_COLUMN 
discriminator is always present |
   | 
`buildQuery_withNoOptionalConditions_shouldProduceOnlyTableColumnCondition` | 
Only TABLE_COLUMN condition when no filters set |
   | `buildQuery_withUuid_shouldIncludeUuidCondition` | UUID filter adds 
correct condition |
   | `buildQuery_withSource_shouldIncludeServiceConditions` | Source 
(service/instance/endpoint) filters each add their own condition |
   | `buildQuery_withEventType_shouldIncludeTypeCondition` | EventType filter 
adds correct condition |
   | `buildQuery_withTableColumnConditionOnlyOnce` | TABLE_COLUMN condition 
appears exactly once even with other filters |
   
   `buildQuery()` uses `Stream.Builder` and returns `Tuple2<Stream<String>, 
Stream<Object>>`, so tests collect both streams and assert on conditions and 
bound parameters.


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