kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [kafka] branch 1.1 updated: HOTFIX: Fix checkstyle errors in MetricsTest (#5345)
Date Fri, 06 Jul 2018 23:10:18 GMT
This is an automated email from the ASF dual-hosted git repository.

jgus pushed a commit to branch 1.1
in repository https://gitbox.apache.org/repos/asf/kafka.git


The following commit(s) were added to refs/heads/1.1 by this push:
     new 9e20618  HOTFIX: Fix checkstyle errors in MetricsTest (#5345)
9e20618 is described below

commit 9e2061888c512c5fd3e079872021bdaa63531edd
Author: Jason Gustafson <jason@confluent.io>
AuthorDate: Fri Jul 6 16:10:13 2018 -0700

    HOTFIX: Fix checkstyle errors in MetricsTest (#5345)
    
    This was broken when picking #5341 into 1.1.
    
    Reviewers: Guozhang Wang <wangguoz@gmail.com>
---
 .../apache/kafka/common/metrics/MetricsTest.java   | 50 ++++++++++------------
 1 file changed, 23 insertions(+), 27 deletions(-)

diff --git a/clients/src/test/java/org/apache/kafka/common/metrics/MetricsTest.java b/clients/src/test/java/org/apache/kafka/common/metrics/MetricsTest.java
index a902de0..32669ff 100644
--- a/clients/src/test/java/org/apache/kafka/common/metrics/MetricsTest.java
+++ b/clients/src/test/java/org/apache/kafka/common/metrics/MetricsTest.java
@@ -624,16 +624,15 @@ public class MetricsTest {
         final AtomicBoolean alive = new AtomicBoolean(true);
         executorService = Executors.newSingleThreadExecutor();
         executorService.submit(new ConcurrentMetricOperation(alive, "record", new Runnable()
{
-                    @Override
-                    public void run() {
-                        while (alive.get()) {
-                            for (Sensor sensor : sensors) {
-                                sensor.record(random.nextInt(10000));
-                            }
-                        }
+            @Override
+            public void run() {
+                while (alive.get()) {
+                    for (Sensor sensor : sensors) {
+                        sensor.record(random.nextInt(10000));
                     }
-                })
-        );
+                }
+            }
+        }));
 
         for (int i = 0; i < 10000; i++) {
             if (sensors.size() > 5) {
@@ -708,28 +707,25 @@ public class MetricsTest {
                     }
                 }
             }
-        })
-        );
+        }));
         Future<?> readFuture = executorService.submit(new ConcurrentMetricOperation(alive,
"read", new Runnable() {
-                    @Override
-                    public void run() {
-                        while (alive.get()) {
-                            for (Sensor sensor : sensors) {
-                                for (Metric metric : sensor.metrics()) {
-                                    assertNotNull("Invalid metric value", metric.metricValue());
-                                }
-                            }
+            @Override
+            public void run() {
+                while (alive.get()) {
+                    for (Sensor sensor : sensors) {
+                        for (Metric metric : sensor.metrics()) {
+                            assertNotNull("Invalid metric value", metric.metricValue());
                         }
                     }
-                })
-        );
+                }
+            }
+        }));
         Future<?> reportFuture = executorService.submit(new ConcurrentMetricOperation(alive,
"report", new Runnable() {
-                    @Override
-                    public void run() {
-                        reporter.processMetrics();
-                    }
-                })
-        );
+            @Override
+            public void run() {
+                reporter.processMetrics();
+            }
+        }));
 
         for (int i = 0; i < 10000; i++) {
             if (sensors.size() > 10) {


Mime
View raw message