Re: [PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]
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]
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]
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]
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]
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]
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]
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
[PR] KAFKA-15610: Fix CoreUtils.swallow() test gaps [kafka]
ghostspiders opened a new pull request, #15410: URL: https://github.com/apache/kafka/pull/15410 The CoreUtils.swallow() method in different logging levels test. -- 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]
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]
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]
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]
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
[PR] KAFKA-15610: Fix `CoreUtils.swallow()` test gaps [kafka]
atu-sharm opened a new pull request, #14583: URL: https://github.com/apache/kafka/pull/14583 Adding test to check that the passed in `logging` is used in case of an exception for CoreUtils.swallow. https://github.com/apache/kafka/pull/14529#discussion_r1355277747. -- 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