Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]

2024-04-11 Thread via GitHub


chia7712 commented on PR #14583:
URL: https://github.com/apache/kafka/pull/14583#issuecomment-2049435374

   close as #15410 gets merged


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



Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]

2024-04-11 Thread via GitHub


chia7712 closed pull request #14583: KAFKA-15610: Fix `CoreUtils.swallow()` 
test gaps
URL: https://github.com/apache/kafka/pull/14583


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



Re: [PR] KAFKA-15610: Fix CoreUtils.swallow() test gaps [kafka]

2024-04-11 Thread via GitHub


chia7712 commented on PR #15410:
URL: https://github.com/apache/kafka/pull/15410#issuecomment-2049434959

   @ghostspiders Do you have jira account?


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



Re: [PR] KAFKA-15610: Fix CoreUtils.swallow() test gaps [kafka]

2024-04-11 Thread via GitHub


chia7712 merged PR #15410:
URL: https://github.com/apache/kafka/pull/15410


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



Re: [PR] KAFKA-15610: Fix CoreUtils.swallow() test gaps [kafka]

2024-02-25 Thread via GitHub


ghostspiders commented on PR #15410:
URL: https://github.com/apache/kafka/pull/15410#issuecomment-1963010389

   @divijvaidya I am using Mockito's verify to test CoreUtils.swallow(), but I 
am encountering an 'Argument(s) are different! Wanted:' error because the 
parameter is a function. I currently do not have a good solution for this issue.


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



Re: [PR] KAFKA-15610: Fix CoreUtils.swallow() test gaps [kafka]

2024-02-22 Thread via GitHub


divijvaidya commented on PR #15410:
URL: https://github.com/apache/kafka/pull/15410#issuecomment-1959190316

   There is a previous PR open for this at 
https://github.com/apache/kafka/pull/14583 
   
   I have a comment there on possible usage of `spy`. Can you please explore 
that approach and let us know why it might or might not be feasible.


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



Re: [PR] KAFKA-15610: Fix CoreUtils.swallow() test gaps [kafka]

2024-02-21 Thread via GitHub


ghostspiders commented on PR #15410:
URL: https://github.com/apache/kafka/pull/15410#issuecomment-1956966547

   Hi,  @divijvaidya  please review this


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



Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]

2024-01-19 Thread via GitHub


divijvaidya commented on PR #14583:
URL: https://github.com/apache/kafka/pull/14583#issuecomment-1900157802

   @atu-sharm would you like to continue on this PR?


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



Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]

2024-01-18 Thread via GitHub


github-actions[bot] commented on PR #14583:
URL: https://github.com/apache/kafka/pull/14583#issuecomment-1899638097

   This PR is being marked as stale since it has not had any activity in 90 
days. If you would like to keep this PR alive, please ask a committer for 
review. If the PR has  merge conflicts, please update it with the latest from 
trunk (or appropriate release branch)  If this PR is no longer valid or 
desired, please feel free to close it. If no activity occurs in the next 30 
days, it will be automatically closed.


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



Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]

2023-10-20 Thread via GitHub


divijvaidya commented on code in PR #14583:
URL: https://github.com/apache/kafka/pull/14583#discussion_r1367044096


##
core/src/test/scala/unit/kafka/utils/CoreUtilsTest.scala:
##
@@ -43,6 +43,18 @@ class CoreUtilsTest extends Logging {
 CoreUtils.swallow(throw new KafkaException("test"), this, Level.INFO)
   }
 
+  @Test
+  def testSwallowLogging(): Unit = {
+var loggedMessage: Option[String] = None
+val testLogging: Logging = new Logging {
+  override def info(msg: => String, e: => Throwable): Unit = {
+loggedMessage = Some(msg)
+  }
+}
+CoreUtils.swallow(throw new KafkaException("test"), testLogging, 
Level.INFO)

Review Comment:
   alternatively, you can `spy` Logging and then verify invocation of 
testLogging.info. The advantage of that approach is that we won't have to 
override the logging behaviour.
   
   Also, could you check nearby methods in this class and see if any other 
method requires a similar test? Might as well bundle them together in this PR 
while we are at it.



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



Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]

2023-10-19 Thread via GitHub


atu-sharm commented on PR #14583:
URL: https://github.com/apache/kafka/pull/14583#issuecomment-1770123147

   Hi, @ijuma @divijvaidya can you please review this


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