Skip to content

Commit

Permalink
[Tests] Dump function logs when testJavaLoggingFunction test fails (a…
Browse files Browse the repository at this point in the history
…pache#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
  • Loading branch information
lhotari authored Jun 3, 2022
1 parent 10a8c85 commit c876c13
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1502,8 +1502,13 @@ protected void testLoggingFunction(Runtime runtime) throws Exception {
// 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);
Expand Down

0 comments on commit c876c13

Please sign in to comment.