ijuma commented on a change in pull request #9894:
URL: https://github.com/apache/kafka/pull/9894#discussion_r558314026



##########
File path: 
connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorSourceTaskTest.java
##########
@@ -58,26 +58,26 @@ public void testSerde() {
     public void testOffsetSync() {
         MirrorSourceTask.PartitionState partitionState = new 
MirrorSourceTask.PartitionState(50);
 
-        assertTrue("always emit offset sync on first update",
-            partitionState.update(0, 100));
-        assertTrue("upstream offset skipped -> resync",
-            partitionState.update(2, 102));
-        assertFalse("no sync",
-            partitionState.update(3, 152));
-        assertFalse("no sync",
-            partitionState.update(4, 153));
-        assertFalse("no sync",
-            partitionState.update(5, 154));
-        assertTrue("one past target offset",
-            partitionState.update(6, 205));
-        assertTrue("upstream reset",
-            partitionState.update(2, 206));
-        assertFalse("no sync",
-            partitionState.update(3, 207));
-        assertTrue("downstream reset",
-                partitionState.update(4, 3));
-        assertFalse("no sync",
-            partitionState.update(5, 4));
+        assertTrue(partitionState.update(0, 100),
+            "always emit offset sync on first update");
+        assertTrue(partitionState.update(2, 102),
+            "upstream offset skipped -> resync");
+        assertFalse(partitionState.update(3, 152),
+            "no sync");
+        assertFalse(partitionState.update(4, 153),
+            "no sync");
+        assertFalse(partitionState.update(5, 154),
+            "no sync");
+        assertTrue(partitionState.update(6, 205),
+            "one past target offset");
+        assertTrue(partitionState.update(2, 206),
+            "upstream reset");
+        assertFalse(partitionState.update(3, 207),
+            "no sync");
+        assertTrue(partitionState.update(4, 3),
+                "downstream reset");
+        assertFalse(partitionState.update(5, 4),
+            "no sync");

Review comment:
       These can probably be all in one line.

##########
File path: 
connect/mirror/src/test/java/org/apache/kafka/connect/mirror/MirrorMakerConfigTest.java
##########
@@ -52,12 +52,12 @@ public void testClusterConfigProperties() {
             "replication.factor", "4"));
         Map<String, String> connectorProps = 
mirrorConfig.connectorBaseConfig(new SourceAndTarget("a", "b"),
             MirrorSourceConnector.class);
-        assertEquals("source.cluster.bootstrap.servers is set",
-            "servers-one", 
connectorProps.get("source.cluster.bootstrap.servers"));
-        assertEquals("target.cluster.bootstrap.servers is set",
-            "servers-two", 
connectorProps.get("target.cluster.bootstrap.servers"));
-        assertEquals("top-level security.protocol is passed through to 
connector config",
-            "SASL", connectorProps.get("security.protocol"));
+        assertEquals("servers-one",
+            connectorProps.get("source.cluster.bootstrap.servers"), 
"source.cluster.bootstrap.servers is set");
+        assertEquals("servers-two",
+            connectorProps.get("target.cluster.bootstrap.servers"), 
"target.cluster.bootstrap.servers is set");
+        assertEquals("SASL",
+            connectorProps.get("security.protocol"), "top-level 
security.protocol is passed through to connector config");

Review comment:
       You could move the second parameter to the first line in many of these 
asserts now that the string was moved to the end.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to