oleg-vlsk commented on code in PR #12573:
URL: https://github.com/apache/ignite/pull/12573#discussion_r2608851817


##########
modules/indexing/src/test/java/org/apache/ignite/internal/processors/query/LongRunningQueryTest.java:
##########
@@ -517,6 +520,36 @@ public void 
testEmptyHeavyQueriesTrackerWithMultipleCancelledQueries() {
             cancelQuery(qryIds.poll());
     }
 
+    /**
+     * Verifies query initiator id information in logs.
+     */
+    @Test
+    @MultiNodeTest
+    public void testQueryInitiatorId() throws Exception {
+        ListeningTestLogger testLog = testLog();
+
+        checkInitiatorId(testLog, "LOCAL", "SELECT sleep_func(?, 0)", 
LONG_QUERY_WARNING_TIMEOUT);
+
+        checkInitiatorId(testLog, "MAP", "SELECT val FROM test WHERE id = 
sleep_func(?, 0)",
+            LONG_QUERY_WARNING_TIMEOUT);
+
+        checkInitiatorId(testLog, "REDUCE", "SELECT sleep_func(?, sum(val)) 
FROM test WHERE id + 1 = 1",
+            LONG_QUERY_WARNING_TIMEOUT);
+    }
+
+    /** */
+    private void checkInitiatorId(ListeningTestLogger log, String type, String 
sql, Object... args) {
+        String initiatorId = UUID.randomUUID().toString();
+
+        LogListener lsnr = 
LogListener.matches(LONG_QUERY_FINISHED_MSG).andMatches(type).andMatches(initiatorId).build();

Review Comment:
   Wouldn't be better to use `"type=" + type` to make sure that this exact 
string is found?



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