yyu1993 commented on code in PR #15384: URL: https://github.com/apache/kafka/pull/15384#discussion_r1499702168
########## core/src/test/scala/unit/kafka/coordinator/transaction/TransactionStateManagerTest.scala: ########## @@ -527,16 +532,20 @@ class TransactionStateManagerTest { def assertListTransactions( expectedTransactionalIds: Set[String], filterProducerIds: Set[Long] = Set.empty, - filterStates: Set[String] = Set.empty + filterStates: Set[String] = Set.empty, + filterDuration: Long = -1L ): Unit = { - val listResponse = transactionManager.listTransactionStates(filterProducerIds, filterStates) + val listResponse = transactionManager.listTransactionStates(filterProducerIds, filterStates, filterDuration) assertEquals(Errors.NONE, Errors.forCode(listResponse.errorCode)) assertEquals(expectedTransactionalIds, listResponse.transactionStates.asScala.map(_.transactionalId).toSet) val expectedUnknownStates = filterStates.filter(state => TransactionState.fromName(state).isEmpty) assertEquals(expectedUnknownStates, listResponse.unknownStateFilters.asScala.toSet) } - assertListTransactions(Set("t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7")) + assertListTransactions(Set("t0", "t1", "t2", "t3", "t4", "t5", "t6", "t7"), filterDuration = 0L) + assertListTransactions(Set("t0", "t1", "t2", "t3"), filterDuration = 1000L) + assertListTransactions(Set("t0", "t1"), filterDuration = 2000L) Review Comment: Their durations are 2000L so they will be filtered out. -- 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