vldpyatkov commented on code in PR #13053:
URL: https://github.com/apache/ignite/pull/13053#discussion_r3126204266
##########
modules/core/src/test/java/org/apache/ignite/internal/metric/JmxExporterSpiTest.java:
##########
@@ -1068,25 +1068,26 @@ private void
checkStripeExecutorView(IgniteStripedExecutor execSvc, String viewN
execSvc.execute(1, new TestRunnable(latch, 3));
try {
- boolean res = waitForCondition(() -> systemView(viewName).size()
== 2, 5_000);
+ assertTrue(waitForCondition(() -> systemView(viewName).size() >=
2, 5_000));
- assertTrue(res);
+ Set<Integer> taskStripeIdxs = new HashSet<>();
+
+ for (Map.Entry<Object, Object> entry :
systemView(viewName).entrySet()) {
+ CompositeData row = (CompositeData)entry.getValue();
- TabularDataSupport view = systemView(viewName);
+ int stripeIdx = (int)row.get("stripeIndex");
+ assertEquals(poolName + "-stripe-" + stripeIdx,
row.get("threadName"));
- CompositeData row0 = view.get(new Object[] {0});
+ String desc = (String)row.get("description");
- assertEquals(0, row0.get("stripeIndex"));
- assertEquals(TestRunnable.class.getSimpleName() + '1',
row0.get("description"));
- assertEquals(poolName + "-stripe-0", row0.get("threadName"));
- assertEquals(TestRunnable.class.getName(), row0.get("taskName"));
+ if (desc.contains(TestRunnable.class.getSimpleName())) {
Review Comment:
Could you explain when the description does not contain a task name?
##########
modules/core/src/test/java/org/apache/ignite/internal/metric/JmxExporterSpiTest.java:
##########
@@ -1068,25 +1068,26 @@ private void
checkStripeExecutorView(IgniteStripedExecutor execSvc, String viewN
execSvc.execute(1, new TestRunnable(latch, 3));
try {
- boolean res = waitForCondition(() -> systemView(viewName).size()
== 2, 5_000);
+ assertTrue(waitForCondition(() -> systemView(viewName).size() >=
2, 5_000));
Review Comment:
Why are you sure that the view would contain more than 2 rows?
--
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]