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