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


##########
modules/calcite/src/test/java/org/apache/ignite/internal/processors/query/calcite/integration/SqlPlanHistoryIntegrationTest.java:
##########
@@ -673,6 +720,50 @@ public void checkMetrics(int size, Map<SqlPlan, Long> 
sqlPlans) {
         }
     }
 
+    /**
+     * Compares entries in the plan history before and after the reset event.
+     *
+     * @param reset Reset event.
+     */
+    public void checkReset(Runnable reset) throws Exception {
+        startTestGrid();
+
+        IgniteCache<Integer, String> cache = queryNode().cache("A");
+
+        String[] qryText = new String[2];
+
+        for (int i = 1; i <= 2; i++) {
+            cache.put(100 + i, "STR" + i);
+
+            cacheQuery(new SqlFieldsQuery(SQL + " where _val='STR" + i + 
"'").setLocal(loc), "A");
+
+            qryText[i - 1] = 
getSqlPlanHistory().keySet().stream().findFirst().map(SqlPlan::query).orElse("");

Review Comment:
   History check added, `F.first` used instead of `findFirst`.



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