You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by GitBox <gi...@apache.org> on 2020/08/11 10:22:12 UTC

[GitHub] [ignite] NSAmelchev commented on a change in pull request #8138: IGNITE-13347: InitialSize, MaxSize added to data region metrics

NSAmelchev commented on a change in pull request #8138:
URL: https://github.com/apache/ignite/pull/8138#discussion_r468471231



##########
File path: modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
##########
@@ -166,8 +166,17 @@ public void testDataRegionMetrics() throws Exception {
 
         Set<String> names = new HashSet<>();
 
+        DataRegionConfiguration cfg =
+            ignite0.configuration().getDataStorageConfiguration().getDefaultDataRegionConfiguration();

Review comment:
       Add empty line, please

##########
File path: modules/indexing/src/test/java/org/apache/ignite/internal/processors/cache/metric/SqlViewExporterSpiTest.java
##########
@@ -166,8 +166,17 @@ public void testDataRegionMetrics() throws Exception {
 
         Set<String> names = new HashSet<>();
 
+        DataRegionConfiguration cfg =
+            ignite0.configuration().getDataStorageConfiguration().getDefaultDataRegionConfiguration();
         for (List<?> row : res) {
-            names.add((String)row.get(0));
+            String name = (String)row.get(0);
+
+            names.add(name);
+
+            if ("InitialSize".equals(name))
+                assertEquals(Long.toString(cfg.getInitialSize()), row.get(1));
+            else if ("MaxSize".equals(name))
+                assertEquals(Long.toString(cfg.getMaxSize()), row.get(1));
 
             assertNotNull("Metric value must be not null [name=" + row.get(0) + ']', row.get(1));

Review comment:
       The new var `name` can be used instead of `row.get(0)`
    `row.get(1)` can be as a var too.




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org