You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by ca...@apache.org on 2021/11/09 22:21:23 UTC

[samza] branch master updated: [Tests] add more context on flaky testProcessingFutureCompletesAfterTaskTimeout test (#1554)

This is an automated email from the ASF dual-hosted git repository.

cameronlee pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/samza.git


The following commit(s) were added to refs/heads/master by this push:
     new 1254659  [Tests] add more context on flaky testProcessingFutureCompletesAfterTaskTimeout test (#1554)
1254659 is described below

commit 1254659cbe9ec730b579e1ba22f7a03164e9794e
Author: Cameron Lee <ca...@linkedin.com>
AuthorDate: Tue Nov 9 14:20:33 2021 -0800

    [Tests] add more context on flaky testProcessingFutureCompletesAfterTaskTimeout test (#1554)
---
 .../java/org/apache/samza/test/operator/TestAsyncFlatMap.java | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/samza-test/src/test/java/org/apache/samza/test/operator/TestAsyncFlatMap.java b/samza-test/src/test/java/org/apache/samza/test/operator/TestAsyncFlatMap.java
index d5a5e7e..462841c 100644
--- a/samza-test/src/test/java/org/apache/samza/test/operator/TestAsyncFlatMap.java
+++ b/samza-test/src/test/java/org/apache/samza/test/operator/TestAsyncFlatMap.java
@@ -93,7 +93,8 @@ public class TestAsyncFlatMap {
        * nested within a bunch of other exceptions.
        */
       Throwable rootCause = findRootCause(e);
-      assertTrue(rootCause instanceof SamzaException);
+      assertTrue(String.format("Got exception %s with message %s", rootCause.getClass(), rootCause.getMessage()),
+          rootCause instanceof SamzaException);
       // the "{}" is intentional, since the exception message actually includes it (probably a logging bug)
       assertEquals("Callback for task {} Partition 0 timed out after 100 ms.", rootCause.getMessage());
     }
@@ -112,7 +113,9 @@ public class TestAsyncFlatMap {
        * TestRunner throws SamzaException on failures in general, so check the actual cause. The actual exception is
        * nested within a bunch of other exceptions.
        */
-      assertTrue(findRootCause(e) instanceof ProcessFailureException);
+      Throwable rootCause = findRootCause(e);
+      assertTrue(String.format("Got exception %s with message %s", rootCause.getClass(), rootCause.getMessage()),
+          rootCause instanceof ProcessFailureException);
     }
   }
 
@@ -129,7 +132,9 @@ public class TestAsyncFlatMap {
        * TestRunner throws SamzaException on failures in general, so check the actual cause. The actual exception is
        * nested within a bunch of other exceptions.
        */
-      assertTrue(findRootCause(e) instanceof FilterFailureException);
+      Throwable rootCause = findRootCause(e);
+      assertTrue(String.format("Got exception %s with message %s", rootCause.getClass(), rootCause.getMessage()),
+          rootCause instanceof FilterFailureException);
     }
   }