virajjasani commented on a change in pull request #1286: HBASE-23977 : Resolve 
flakes present in TestSlowLogRecorder
URL: https://github.com/apache/hbase/pull/1286#discussion_r393458445
 
 

 ##########
 File path: 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/slowlog/TestSlowLogRecorder.java
 ##########
 @@ -93,12 +91,14 @@ private static Configuration applySlowLogRecorderConf(int 
eventSize) {
    * @param i index of ringbuffer logs
    * @param j data value that was put on index i
    * @param slowLogPayloads list of payload retrieved from {@link 
SlowLogRecorder}
+   * @return if actual values are as per expectations
    */
-  private void confirmPayloadParams(int i, int j, List<SlowLogPayload> 
slowLogPayloads) {
+  private boolean confirmPayloadParams(int i, int j, List<SlowLogPayload> 
slowLogPayloads) {
 
-    Assert.assertEquals(slowLogPayloads.get(i).getClientAddress(), "client_" + 
j);
-    Assert.assertEquals(slowLogPayloads.get(i).getUserName(), "userName_" + j);
-    Assert.assertEquals(slowLogPayloads.get(i).getServerClass(), "class_" + j);
+    boolean isClientExpected = 
slowLogPayloads.get(i).getClientAddress().equals("client_" + j);
 
 Review comment:
   I agree but this is just for better readability. Should be fine to keep it 
this way?
   Especially because statements are bit longer and hence these variables can 
help with better readability?

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to