panbingkun commented on code in PR #45784:
URL: https://github.com/apache/spark/pull/45784#discussion_r1545535609


##########
common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala:
##########
@@ -52,28 +57,27 @@ abstract class LoggingSuiteBase extends AnyFunSuite // 
scalastyle:ignore funsuit
 
   def msgWithMDCAndException: LogEntry = log"Error in executor 
${MDC(EXECUTOR_ID, "1")}."
 
-  def expectedPatternForBasicMsg(level: String): String
+  def expectedPatternForBasicMsg(level: Level): String
 
-  def expectedPatternForMsgWithMDC(level: String): String
+  def expectedPatternForMsgWithMDC(level: Level): String
 
-  def expectedPatternForMsgWithMDCAndException(level: String): String
+  def expectedPatternForMsgWithMDCAndException(level: Level): String
 
   test("Basic logging") {
-    val msg = "This is a log message"

Review Comment:
   `msg` and `basicMsg` are `duplicated`, we can make full use of `basicMsg`.
   
https://github.com/apache/spark/blob/11d76c96554cc71c6a941c99222c08c76bd04bf2/common/utils/src/test/scala/org/apache/spark/util/StructuredLoggingSuite.scala#L49



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to