You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by lh...@apache.org on 2022/06/03 06:54:43 UTC
[pulsar] branch master updated: [Tests] Dump function logs when testJavaLoggingFunction test fails (#15910)
This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new c876c13ade9 [Tests] Dump function logs when testJavaLoggingFunction test fails (#15910)
c876c13ade9 is described below
commit c876c13ade9465836c53367f7cbf96e05a7f7df2
Author: Lari Hotari <lh...@users.noreply.github.com>
AuthorDate: Fri Jun 3 09:54:31 2022 +0300
[Tests] Dump function logs when testJavaLoggingFunction test fails (#15910)
- the test is currently the most flaky test and it would be useful to add this logging
so the the problem could be investigated
---
.../pulsar/tests/integration/functions/PulsarFunctionsTest.java | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java
index f9b90b4d75b..9a6a26be3da 100644
--- a/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java
+++ b/tests/integration/src/test/java/org/apache/pulsar/tests/integration/functions/PulsarFunctionsTest.java
@@ -1502,8 +1502,13 @@ public abstract class PulsarFunctionsTest extends PulsarFunctionsTestBase {
// get function stats
getFunctionStatsEmpty(functionName);
- // publish and consume result
- publishAndConsumeMessages(inputTopicName, logTopicName, numMessages, "-log");
+ try {
+ // publish and consume result
+ publishAndConsumeMessages(inputTopicName, logTopicName, numMessages, "-log");
+ } finally {
+ // dump function logs so that it's easier to investigate failures
+ pulsarCluster.dumpFunctionLogs(functionName);
+ }
// get function status
getFunctionStatus(functionName, numMessages, true);