[
https://issues.apache.org/jira/browse/DAFFODIL-2848?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Steve Lawrence resolved DAFFODIL-2848.
--------------------------------------
Resolution: Won't Fix
If I make the change to unconditionally run all tests with debug enabled, alot
of the CLI output is printed to the screen even when tests pass. But it's not
for all tests, and it changes every time. I think it has something to do with
the junit interface and race conditions with tring to capture stdout--the junit
interafce documentation mentions this about the -q option to suppress output
except on failure:
bq. Suppress stdout for successful tests. Stderr is printed to the console
normally. Stdout is written to a buffer and discarded when a test succeeds. If
it fails, the buffer is dumped to the console. Since stdio redirection in Java
is a bad kludge (System.setOut() changes the static final field System.out
through native code) this may not work for all scenarios. Scala has its own
console with a sane redirection feature. If Scala is detected on the class
path, junit-interface tries to reroute scala.Console's stdout, too.
I don't think it's a good idea to have text output on success, especially when
it's inconsistent, so I think we should not make this change. To get more
information about CLI test failures, I think we just need to rely on the
"debug" flag to be manually enabled.
Resolving as won't fix.
> Output hidden when CLI test fails
> ---------------------------------
>
> Key: DAFFODIL-2848
> URL: https://issues.apache.org/jira/browse/DAFFODIL-2848
> Project: Daffodil
> Issue Type: Bug
> Components: CLI
> Reporter: Steve Lawrence
> Assignee: Steve Lawrence
> Priority: Major
>
> By default, the CLI test infrastructure does not echo the output of CLI tests
> to stdout. This means that if a CLI test fails, it can be difficult to figure
> out what the issue is. One option is to add {{debug = true}} to the
> {{cliRun}} function and re-run the test, but that isn't obvious if your not
> familiar with the cliRun command.
> Instead, we should just always echo the CLI output and rely on test tools or
> IDEs to capture the output and only show it when a test fails or more
> information. Note that we conditionally dump the CLI test streams if there is
> an error, since in some cases the stream is already lost by the time an error
> is found (e.g. unexpected exit code).
--
This message was sent by Atlassian Jira
(v8.20.10#820010)