fonsdant commented on code in PR #17198:
URL: https://github.com/apache/kafka/pull/17198#discussion_r1829080217


##########
streams/streams-scala/src/test/scala/org/apache/kafka/streams/scala/kstream/KStreamTest.scala:
##########
@@ -478,27 +479,51 @@ class KStreamTest extends TestDriver {
     assertEquals("my-name", joinNode.name())
   }
 
-//  @nowarn
-//  @Test
-//  def testSettingNameOnTransform(): Unit = {
-//    class TestTransformer extends Transformer[String, String, 
KeyValue[String, String]] {
-//      override def init(context: ProcessorContext): Unit = {}
-//
-//      override def transform(key: String, value: String): KeyValue[String, 
String] =
-//        new KeyValue(s"$key-transformed", s"$value-transformed")
-//
-//      override def close(): Unit = {}
-//    }
-//    val builder = new StreamsBuilder()
-//    val sourceTopic = "source"
-//    val sinkTopic = "sink"
-//
-//    val stream = builder.stream[String, String](sourceTopic)
-//    stream
-//      .transform(() => new TestTransformer, Named.as("my-name"))
-//      .to(sinkTopic)
-//
-//    val transformNode = 
builder.build().describe().subtopologies().asScala.head.nodes().asScala.toList(1)
-//    assertEquals("my-name", transformNode.name())
-//  }
+  @Test
+  def testSettingNameOnTransform(): Unit = {
+    val processorSupplier: ProcessorSupplier[String, String, String, String] =
+      new api.ProcessorSupplier[String, String, String, String] {

Review Comment:
   Oh, it is true... I have made this way, because IntelliJ highlight the 
"TestProcessor" as an error --- probably conflicting with the deprecated 
`process`. See:
   
   
![image](https://github.com/user-attachments/assets/582b86e0-232d-4c68-ab18-0faebb3060ae)
   
   But I can actually run the test this way:
   
   
![image](https://github.com/user-attachments/assets/adf5a3df-8f3d-4fbe-90c7-05a1514f743c)
   
   



-- 
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: jira-unsubscr...@kafka.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to