[ 
https://issues.apache.org/jira/browse/DAFFODIL-2878?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17820201#comment-17820201
 ] 

Steve Lawrence commented on DAFFODIL-2878:
------------------------------------------

I can close the PR if you think "debug = true" is sufficient. It hard to 
document it and make it obvious though.

SBT run's tests from the root of the repo, regardless of the subproject (e.g. 
daffodil.git).

IDE's run tests from the root of the subproject (e.g. 
daffodil.git/daffodil-cli). 

I think there are two ways to resolve this:
1. Set the DAFFODIL_HOME environment variable to the absolute path to your 
daffodil.git repo. CLI tests will prepend this to all "path()"s, so all your 
paths are absolute and the CWD doesn't matter.
2. Modify the IDE so that tests in the daffodil-cli subproject are run from the 
daffodil.git directory. I believe [~olabusayo] does this, though I don't know 
the details of where the setting is to do this.

Personally I prefer 2, I would like to remove DAFFODIL_HOME so that regardless 
of IDE all commands are exactly the same instead of sometimes using relative 
paths an sometimes using absolute paths.

> cli test expect timeouts need to display the captured text that doesn't meet 
> the expectation
> --------------------------------------------------------------------------------------------
>
>                 Key: DAFFODIL-2878
>                 URL: https://issues.apache.org/jira/browse/DAFFODIL-2878
>             Project: Daffodil
>          Issue Type: Improvement
>          Components: Infrastructure
>    Affects Versions: 3.6.0
>            Reporter: Mike Beckerle
>            Priority: Minor
>
> When a CLI test fails due to an expect timeout such as:
>  
> {code:java}
> [error] Test 
> org.apache.daffodil.cli.cliTest.TestCLIParsing.test_Layer_Execution_Error 
> failed: net.sf.expectit.ExpectIOException: Expect operation fails (timeout: 
> -1 ms) for matcher: contains('Unexpected exception in layer transformer 
> 'buggy''), took 3.414 sec
> [error]     at net.sf.expectit.ExpectImpl.expectIn(ExpectImpl.java:106)
> {code}
> It could be good if the actual output text was displayed so that one can see 
> why the expectation was not met.
> Without that, it's actually a bit tedious to reproduce the test in order to 
> see the actual output. You have to stage daffodil, mine the command line with 
> all args from the CLI test, and then issue the command line to daffodil. 
> It's not so easy to debug into the expect utility to find the text at issue. 
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to