mjsax commented on code in PR #16745:
URL: https://github.com/apache/kafka/pull/16745#discussion_r1701352193


##########
streams/src/test/java/org/apache/kafka/streams/integration/EosV2UpgradeIntegrationTest.java:
##########
@@ -947,8 +948,9 @@ public void process(final Record<Long, Long> record) {
             } else {
                 int exceptionCount = exceptionCounts.get(appDir);
                 // should only have our injected exception or commit 
exception, and 2 exceptions for each stream
-                if (++exceptionCount > 2 || !(e instanceof RuntimeException) ||
-                    !(e.getMessage().contains("test exception"))) {
+                if (++exceptionCount > 2 ||
+                    !(e instanceof StreamsException) ||
+                    !(e.getCause().getMessage().endsWith(" test exception."))) 
{

Review Comment:
   As above. However, we cannot use `equals` as the use different error 
messages for different situation when we throw.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to