MaxGekk commented on a change in pull request #27166:
[SPARK-30482][SQL][CORE][TESTS] Add sub-class of `AppenderSkeleton` reusable in
tests
URL: https://github.com/apache/spark/pull/27166#discussion_r365562130
##########
File path:
sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/optimizer/OptimizerLoggingSuite.scala
##########
@@ -39,45 +36,25 @@ class OptimizerLoggingSuite extends PlanTest {
ColumnPruning) :: Nil
}
- class MockAppender extends AppenderSkeleton {
- val loggingEvents = new ArrayBuffer[LoggingEvent]()
-
- override def append(loggingEvent: LoggingEvent): Unit = {
- if (loggingEvent.getRenderedMessage().contains("Applying Rule") ||
- loggingEvent.getRenderedMessage().contains("Result of Batch") ||
- loggingEvent.getRenderedMessage().contains("has no effect")) {
- loggingEvents.append(loggingEvent)
- }
- }
-
- override def close(): Unit = {}
- override def requiresLayout(): Boolean = false
- }
-
- private def withLogLevelAndAppender(level: Level, appender: Appender)(f: =>
Unit): Unit = {
Review comment:
This is removed because the method is not used in the test suite.
----------------------------------------------------------------
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
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]